# Periodic jobs # ============= conf = website.app_conf if conf: cron = Cron(website) cron(conf.check_db_every, website.db.self_check, True) cron(conf.dequeue_emails_every, Participant.dequeue_emails, True) cron(conf.send_newsletters_every, Participant.send_newsletters, True) cron(conf.refetch_elsewhere_data_every, refetch_elsewhere_data, True) cron(conf.refetch_repos_every, refetch_repos, True) cron(Weekly(weekday=3, hour=1), check_all_balances, True) cron(Weekly(weekday=3, hour=2), create_payday_issue, True) cron(conf.clean_up_counters_every, website.db.clean_up_counters, True) cron(Daily(hour=16), lambda: fetch_currency_exchange_rates(website.db), True) cron(Daily(hour=17), Payday.update_cached_amounts, True) # Website Algorithm # ================= noop = lambda: None algorithm = website.algorithm algorithm.functions = [ algorithm['parse_environ_into_request'], attach_environ_to_request, algorithm['insert_variables_for_aspen'], algorithm['parse_body_into_request'], algorithm['raise_200_for_OPTIONS'], create_response_object,
conf = website.app_conf if conf: intervals = conf.cron_intervals cron = Cron(website) cron(intervals.get('check_db', 600), website.db.self_check, True) cron(intervals.get('dequeue_emails', 60), Participant.dequeue_emails, True) cron(intervals.get('send_newsletters', 60), Participant.send_newsletters, True) cron(intervals.get('refetch_elsewhere_data', 120), refetch_elsewhere_data, True) cron(intervals.get('refetch_repos', 60), refetch_repos, True) cron(Weekly(weekday=3, hour=2), create_payday_issue, True) cron(intervals.get('clean_up_counters', 3600), website.db.clean_up_counters, True) cron(Daily(hour=16), lambda: fetch_currency_exchange_rates(website.db), True) cron(Daily(hour=17), Payday.update_cached_amounts, True) cron(Daily(hour=8), clean_up_closed_accounts, True) cron(intervals.get('notify_patrons', 1200), Participant.notify_patrons, True) cron(intervals.get('migrate_identities', 120), Participant.migrate_identities, True) if conf.ses_feedback_queue_url: cron(intervals.get('fetch_email_bounces', 60), handle_email_bounces, True) cron(Daily(hour=1), clean_up_emails, True) cron('once', website.cryptograph.rotate_stored_data, True) # Website Algorithm
conf = website.app_conf if conf: intervals = conf.cron_intervals cron = Cron(website) cron(intervals.get('check_db', 600), website.db.self_check, True) cron(intervals.get('dequeue_emails', 60), Participant.dequeue_emails, True) cron(intervals.get('send_newsletters', 60), Participant.send_newsletters, True) cron(intervals.get('refetch_elsewhere_data', 120), refetch_elsewhere_data, True) cron(intervals.get('refetch_repos', 60), refetch_repos, True) cron(Weekly(weekday=3, hour=2), create_payday_issue, True) cron(intervals.get('clean_up_counters', 3600), website.db.clean_up_counters, True) cron(Daily(hour=3), send_upcoming_debit_notifications, True) cron(Daily(hour=4), execute_scheduled_payins, True) cron(Daily(hour=8), clean_up_closed_accounts, True) cron(Daily(hour=16), fetch_currency_exchange_rates, True) cron(Daily(hour=17), paypal.sync_all_pending_payments, True) cron(Daily(hour=18), Payday.update_cached_amounts, True) cron(intervals.get('notify_patrons', 1200), Participant.notify_patrons, True) cron(intervals.get('migrate_identities', 120), Participant.migrate_identities, True) if conf.ses_feedback_queue_url: cron(intervals.get('fetch_email_bounces', 60), handle_email_bounces, True) cron(Daily(hour=1), clean_up_emails, True) cron('once', website.cryptograph.rotate_stored_data, True)