def br_startup(): scheduler.add_interval_task(batch.hourly_task, 60 * 60) if util.is_production(): scheduler.add_weekday_task(batch.nightly_task, range(1, 8), (3, 0)) else: scheduler.add_interval_task(batch.nightly_task, 60 * 5) saved_visit.start_extension() root_variable_providers.append(add_root_vars)
def schedulePM(): (h,m) = config.get("Bossini_order_pickup_time_pm","23:30").split(":") add_weekday_task(action=processPM,weekdays=range(1,8), timeonday=((int(h),int(m))))
def schedule(): (h,m) = config.get("Bossini_backuptime","4:30").split(":") add_weekday_task(action=main,weekdays=range(1,8), timeonday=((int(h),int(m))))
def schedule(): """ Schedule our periodic tasks """ jobs = config.get('jobs') # Weekly repository cleanup if 'clean_repo' in jobs: log.debug("Scheduling clean_repo job") scheduler.add_interval_task(action=clean_repo, taskname="Clean update repositories", initialdelay=604800, interval=604800) # Daily nagmail if 'nagmail' in jobs: log.debug("Scheduling nagmail job") scheduler.add_weekday_task(action=nagmail, weekdays=range(1,8), timeonday=(0,0)) # Fix invalid bug titles if 'fix_bug_titles' in jobs: log.debug("Scheduling fix_bug_titles job") scheduler.add_interval_task(action=fix_bug_titles, taskname='Fix bug titles', initialdelay=1200, interval=604800) # Warm up some data caches if 'cache_release_data' in jobs: log.debug("Scheduling cache_release_data job") scheduler.add_interval_task(action=cache_release_data, taskname='Cache release data', initialdelay=0, interval=43200) # If we're the masher, then handle the costly metric regenration if not config.get('masher') and 'refresh_metrics' in jobs: log.debug("Scheduling refresh_metrics job") scheduler.add_interval_task(action=refresh_metrics, taskname='Refresh our metrics', initialdelay=7200, interval=86400) # Approve updates that have been in testing for a certain amount of time if 'approve_testing_updates' in jobs: log.debug("Scheduling approve_testing_updates job") scheduler.add_interval_task(action=approve_testing_updates, # Run every 6 hours initialdelay=21600, interval=21600) #weekdays=range(1,8), #timeonday=(0,0)) # Automatically expire buildroot overrides if 'approve_testing_updates' in jobs: log.debug("Scheduling expire_buildroot_overrides job") scheduler.add_interval_task(action=expire_buildroot_overrides, # Run every 6 hours initialdelay=3600, interval=3600)
def schedule(): """ Schedule our periodic tasks """ jobs = config.get('jobs') # Weekly repository cleanup if 'clean_repo' in jobs: log.debug("Scheduling clean_repo job") scheduler.add_interval_task(action=clean_repo, taskname="Clean update repositories", initialdelay=604800, interval=604800) # Daily nagmail if 'nagmail' in jobs: log.debug("Scheduling nagmail job") scheduler.add_weekday_task(action=nagmail, weekdays=range(1, 8), timeonday=(0, 0)) # Fix invalid bug titles if 'fix_bug_titles' in jobs: log.debug("Scheduling fix_bug_titles job") scheduler.add_interval_task(action=fix_bug_titles, taskname='Fix bug titles', initialdelay=1200, interval=604800) # Warm up some data caches if 'cache_release_data' in jobs: log.debug("Scheduling cache_release_data job") scheduler.add_interval_task(action=cache_release_data, taskname='Cache release data', initialdelay=0, interval=43200) # If we're the masher, then handle the costly metric regenration if not config.get('masher') and 'refresh_metrics' in jobs: log.debug("Scheduling refresh_metrics job") scheduler.add_interval_task(action=refresh_metrics, taskname='Refresh our metrics', initialdelay=7200, interval=86400) # Approve updates that have been in testing for a certain amount of time if 'approve_testing_updates' in jobs: log.debug("Scheduling approve_testing_updates job") scheduler.add_interval_task( action=approve_testing_updates, # Run every 6 hours initialdelay=21600, interval=21600) #weekdays=range(1,8), #timeonday=(0,0)) # Automatically expire buildroot overrides if 'approve_testing_updates' in jobs: log.debug("Scheduling expire_buildroot_overrides job") scheduler.add_interval_task( action=expire_buildroot_overrides, # Run every 6 hours initialdelay=3600, interval=3600)
def schedule(): add_weekday_task(action=autotick, weekdays=(1,4,5,6,7), timeonday=(06,00)) add_weekday_task(action=autotick, weekdays=(3,7), timeonday=(18,00))
def schedulePM(): (h, m) = config.get("Bossini_order_pickup_time_pm", "23:30").split(":") add_weekday_task(action=processPM, weekdays=range(1, 8), timeonday=((int(h), int(m))))