Skip to content

Commit

Permalink
Merge pull request #34989 from dimagi/gh/repeaters/rate-limit-delay
Browse files Browse the repository at this point in the history
Set repeater rate limit delay in settings.py
  • Loading branch information
gherceg authored Aug 16, 2024
2 parents 43b461e + 52d49d8 commit a5f1afb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion corehq/motech/repeaters/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
RATE_LIMITER_DELAY_RANGE = (timedelta(minutes=0), timedelta(minutes=15))
RATE_LIMITER_DELAY_RANGE = (
timedelta(minutes=getattr(settings, 'MIN_REPEATER_RATE_LIMIT_DELAY', 0)),
timedelta(minutes=getattr(settings, 'MAX_REPEATER_RATE_LIMIT_DELAY', 15)),
)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_PARTITION_COUNT = settings.CHECK_REPEATERS_PARTITION_COUNT
CHECK_REPEATERS_KEY = 'check-repeaters-key'
Expand Down

0 comments on commit a5f1afb

Please sign in to comment.