Skip to content

Commit

Permalink
perf: extend delay
Browse files Browse the repository at this point in the history
  • Loading branch information
karootplx committed Nov 14, 2024
1 parent 69e1974 commit 97a9b04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commons/human_feedback/dojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async def get_task_results_by_task_id(cls, task_id: str) -> List[Dict] | None:
return task_results
except Exception as e:
if attempt < max_retries - 1:
delay = base_delay * 2**attempt
delay = base_delay * 2**attempt + random.uniform(0, 1)
logger.warning(
f"Error occurred while getting task results for task_id {task_id}: {e}. "
f"Retrying in {delay:.2f} seconds..."
Expand Down

0 comments on commit 97a9b04

Please sign in to comment.