Update app.py
Browse files
app.py
CHANGED
|
@@ -610,6 +610,16 @@ async def list_workers():
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 613 |
if __name__ == "__main__":
|
| 614 |
import uvicorn
|
| 615 |
|
|
|
|
| 610 |
"workers": workers_info
|
| 611 |
}
|
| 612 |
|
| 613 |
+
class StatusRequest(BaseModel):
|
| 614 |
+
request_id: str
|
| 615 |
+
|
| 616 |
+
@app.post("/api/check-translation-status")
|
| 617 |
+
async def check_translation_status(req: StatusRequest):
|
| 618 |
+
# بازگشت همان ساختاری که GET /api/status/{request_id} میدهد
|
| 619 |
+
return await check_status(req.request_id)
|
| 620 |
+
|
| 621 |
+
|
| 622 |
+
|
| 623 |
if __name__ == "__main__":
|
| 624 |
import uvicorn
|
| 625 |
|