perf: extend scheduler jitter to weekly/monthly jobs too
This commit is contained in:
parent
6a831224a1
commit
c817c7f769
1 changed files with 1 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ class ScheduledJobType(Document):
|
|||
next_execution = croniter(self.cron_format, last_execution).get_next(datetime)
|
||||
|
||||
jitter = 0
|
||||
if self.frequency in ("Hourly Long", "Daily Long"):
|
||||
if "Long" in self.frequency:
|
||||
jitter = randint(1, 600)
|
||||
return next_execution + timedelta(seconds=jitter)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue