Skip to content

Commit

Permalink
Wait for 1 sec on retry
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Jan 12, 2024
1 parent 58552f2 commit 328e25b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions API/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@router.get("/status/{task_id}/", response_model=SnapshotTaskResponse)
@version(1)
@retry(stop=stop_after_attempt(2), wait=wait_fixed(2))
@retry(stop=stop_after_attempt(2), wait=wait_fixed(1))
async def get_task_status(
task_id,
args: bool = Query(
Expand Down Expand Up @@ -98,7 +98,7 @@ def revoke_task(task_id, user: AuthUser = Depends(staff_required)):

@router.get("/inspect/")
@version(1)
@retry(stop=stop_after_attempt(2), wait=wait_fixed(2))
@retry(stop=stop_after_attempt(2), wait=wait_fixed(1))
async def inspect_workers(
request: Request,
summary: bool = Query(
Expand Down Expand Up @@ -181,7 +181,7 @@ async def get_queue_info():

@router.get("/queue/details/{queue_name}/")
@version(1)
@retry(stop=stop_after_attempt(2), wait=wait_fixed(2))
@retry(stop=stop_after_attempt(2), wait=wait_fixed(1))
async def get_list_details(queue_name: str):
if queue_name not in queues:
raise HTTPException(status_code=404, detail=f"Queue '{queue_name}' not found")
Expand Down

0 comments on commit 328e25b

Please sign in to comment.