perf: extend scheduler jitter to weekly/monthly jobs too

This commit is contained in:
Ankush Menat 2024-04-08 17:03:09 +05:30
parent 6a831224a1
commit c817c7f769

View file

@ -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)