Commit 07b9b7e8 authored by Lukáš Lalinský's avatar Lukáš Lalinský

Fix function names in cron

parent 0a3ecef2
Pipeline #20418 passed with stages
in 2 minutes and 41 seconds
......@@ -3,6 +3,7 @@
import time
import logging
import functools
from schedule import Scheduler
from acoustid.scripts.update_stats import main as update_stats_main
from acoustid.scripts.update_lookup_stats import main as update_lookup_stats_main
......@@ -16,17 +17,20 @@ logger = logging.getLogger(__name__)
def create_schedule(script):
def wrap_job(func):'Running %s', func.__name__)
func(script, None, None)
def wrapper():'Running %s', func.__name__)
func(script, None, None)
return wrapper
schedule = Scheduler()
# hourly jobs
schedule.every(55).to(65), merge_missing_mbids_main)
schedule.every(55).to(65), update_lookup_stats_main)
# daily jobs
schedule.every(23).to(25), update_stats_main)
schedule.every(23).to(25), update_user_agent_stats_main)
schedule.every(23).to(25), cleanup_perf_stats_main)
return schedule
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment