Skip to content

Commit e2a532e

Browse files
authored
Removes async marker of fastapi calls to prevent stops (#23)
1 parent a076199 commit e2a532e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ExportWsStatsRequest(BaseModel):
3434

3535

3636
@app.post("/fit_predict")
37-
async def weakly_supervise(
37+
def weakly_supervise(
3838
request: WeakSupervisionRequest,
3939
) -> responses.PlainTextResponse:
4040
session_token = general.get_ctx_token()
@@ -49,7 +49,7 @@ async def weakly_supervise(
4949

5050

5151
@app.post("/labeling_task_statistics")
52-
async def calculate_task_stats(
52+
def calculate_task_stats(
5353
request: TaskStatsRequest,
5454
) -> responses.PlainTextResponse:
5555
session_token = general.get_ctx_token()
@@ -61,7 +61,7 @@ async def calculate_task_stats(
6161

6262

6363
@app.post("/source_statistics")
64-
async def calculate_source_stats(
64+
def calculate_source_stats(
6565
request: SourceStatsRequest,
6666
) -> responses.PlainTextResponse:
6767
session_token = general.get_ctx_token()
@@ -77,7 +77,7 @@ async def calculate_source_stats(
7777

7878

7979
@app.post("/export_ws_stats")
80-
async def export_ws_stats(request: ExportWsStatsRequest) -> responses.PlainTextResponse:
80+
def export_ws_stats(request: ExportWsStatsRequest) -> responses.PlainTextResponse:
8181
session_token = general.get_ctx_token()
8282
status_code, message = integration.export_weak_supervision_stats(
8383
request.project_id, request.labeling_task_id

0 commit comments

Comments
 (0)