Skip to content

Commit

Permalink
docs: adds comments related to celery task (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
brobro10000 committed Jun 13, 2024
1 parent b576cef commit a849891
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions license_manager/apps/api/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class LoggedTaskWithRetry(LoggedTask): # pylint: disable=abstract-method
# Use exponential backoff for retrying tasks
# see https://docs.celeryq.dev/en/stable/userguide/tasks.html#Task.retry_backoff
# First retry will delay 60 seconds, second will delay 120 seconds, third 240 seconds.
# The retry_backoff_max default value is 600 seconds -> 10 minutes
# https://docs.celeryq.dev/en/stable/userguide/tasks.html#Task.retry_backoff_max
# This will result in the final backoff time reducing from 2⁴ × 60 seconds = 960 seconds to 600 seconds
retry_backoff = 60
# Add randomness to backoff delays to prevent all tasks in queue from executing simultaneously.
# The actual delay value will be a random number in the range (0, retry_backoff)
Expand Down

0 comments on commit a849891

Please sign in to comment.