From 83147eb68a43c81b115a227b190c757d2ac9a6ff Mon Sep 17 00:00:00 2001 From: robcxyz Date: Tue, 25 Jun 2024 17:51:27 -0600 Subject: [PATCH] chore: fix cron --- balanced_backend/main_cron.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/balanced_backend/main_cron.py b/balanced_backend/main_cron.py index 5742a26..8a7c337 100644 --- a/balanced_backend/main_cron.py +++ b/balanced_backend/main_cron.py @@ -121,10 +121,6 @@ def main(): # Run the jobs immediately in order run_cron_with_session(i["func"]) - logger.info("Initialization jobs...") - for i in INITS: - run_cron_with_session(i) - # Then run them in the scheduler sched.add_job( func=run_cron_with_session, @@ -134,6 +130,10 @@ def main(): id=i["func"].__name__, ) + logger.info("Initialization jobs...") + for init in INITS: + run_cron_with_session(init) + sched.start()