Skip to content

Commit

Permalink
logging current task
Browse files Browse the repository at this point in the history
  • Loading branch information
greenw0lf committed Sep 26, 2024
1 parent 863d210 commit 5d141db
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions whisper_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ async def create_task(
task: Task, background_tasks: BackgroundTasks, response: Response
):
global current_task
print(current_task)
if current_task and current_task.status == "PROCESSING":
response.status_code = status.HTTP_503_SERVICE_UNAVAILABLE
return {"msg": "The worker is currently processing a task. Try again later!"}
Expand Down

0 comments on commit 5d141db

Please sign in to comment.