mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Increase jitter to 60
This commit is contained in:
@@ -967,6 +967,7 @@ async def schedule_automation(
|
|||||||
):
|
):
|
||||||
user_timezone = pytz.timezone(timezone)
|
user_timezone = pytz.timezone(timezone)
|
||||||
trigger = CronTrigger.from_crontab(crontime, user_timezone)
|
trigger = CronTrigger.from_crontab(crontime, user_timezone)
|
||||||
|
trigger.jitter = 60
|
||||||
# Generate id and metadata used by task scheduler and process locks for the task runs
|
# Generate id and metadata used by task scheduler and process locks for the task runs
|
||||||
job_metadata = json.dumps(
|
job_metadata = json.dumps(
|
||||||
{
|
{
|
||||||
@@ -996,7 +997,6 @@ async def schedule_automation(
|
|||||||
id=job_id,
|
id=job_id,
|
||||||
name=job_metadata,
|
name=job_metadata,
|
||||||
max_instances=2, # Allow second instance to kill any previous instance with stale lock
|
max_instances=2, # Allow second instance to kill any previous instance with stale lock
|
||||||
jitter=30,
|
|
||||||
)
|
)
|
||||||
return job
|
return job
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user