def run_cron_tasks(): from uwsgidecorators import cron, timer for task in cron_tasks: f, cron_line = task cron_job = cron(*cron_line) cron_job(f) for task in timer_tasks: f, sec = task timer_job = timer(sec) timer_job(f)
def configure_file_watcher(config): if (uwsgi and timer and config.registry.settings['giza.enable_file_watcher']): the_timer = timer(3) the_timer(check_for_modifications)