From c2aec75e17e97626718dc9de767b6f2572cc1005 Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 13 Dec 2017 12:42:44 -0500 Subject: [PATCH] Limit misfire grace time for scheduled tasks --- scheduler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scheduler.py b/scheduler.py index d57e108e3..210705fa7 100644 --- a/scheduler.py +++ b/scheduler.py @@ -10,12 +10,12 @@ from datetime import datetime scheduler = BackgroundScheduler() if automatic == 'True': - scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, id='update_bazarr', name='Update bazarr from source on Github') -scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, id='update_series', name='Update series list from Sonarr') -scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr') -scheduler.add_job(update_all_episodes, 'cron', hour=4, max_instances=1, coalesce=True, id='update_all_episodes', name='Update all episodes from Sonarr') -scheduler.add_job(list_missing_subtitles, 'interval', minutes=5, max_instances=1, coalesce=True, id='list_missing_subtitles', name='Process missing subtitles for all series') -scheduler.add_job(wanted_search_missing_subtitles, 'interval', hours=3, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles') + scheduler.add_job(check_and_apply_update, 'interval', hours=6, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_bazarr', name='Update bazarr from source on Github') +scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_series', name='Update series list from Sonarr') +scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, misfire_grace_time=15, id='add_new_episodes', name='Add new episodes from Sonarr') +scheduler.add_job(update_all_episodes, 'cron', hour=4, max_instances=1, coalesce=True, misfire_grace_time=15, id='update_all_episodes', name='Update all episodes from Sonarr') +scheduler.add_job(list_missing_subtitles, 'interval', minutes=5, max_instances=1, coalesce=True, misfire_grace_time=15, id='list_missing_subtitles', name='Process missing subtitles for all series') +scheduler.add_job(wanted_search_missing_subtitles, 'interval', hours=3, max_instances=1, coalesce=True, misfire_grace_time=15, id='wanted_search_missing_subtitles', name='Search for wanted subtitles') scheduler.start() def execute_now(taskid):