From a8f85a4498a45d786b8b882e8d4730dbbc4aa78f Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 12 Apr 2023 16:36:51 +0100 Subject: [PATCH] chore(build): testing EE cron-Jobs (cherry picked from commit a229f915010e40b7849afec5d541b113fc774237) --- .github/workflows/crons-ee.yaml | 1 + ee/api/routers/crons/core_dynamic_crons.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/crons-ee.yaml b/.github/workflows/crons-ee.yaml index 77c098e4e..b357fea65 100644 --- a/.github/workflows/crons-ee.yaml +++ b/.github/workflows/crons-ee.yaml @@ -10,6 +10,7 @@ on: branches: - dev - api-* + - v1.11.0-patch paths: - "ee/api/**" - "api/**" diff --git a/ee/api/routers/crons/core_dynamic_crons.py b/ee/api/routers/crons/core_dynamic_crons.py index 9febbe18a..89846366b 100644 --- a/ee/api/routers/crons/core_dynamic_crons.py +++ b/ee/api/routers/crons/core_dynamic_crons.py @@ -28,13 +28,14 @@ cron_jobs = [ {"func": unlock_cron, "trigger": CronTrigger(day="*")}, ] -SINGLE_CRONS = [{"func": telemetry_cron, "trigger": CronTrigger(day_of_week="*"), - "misfire_grace_time": 60 * 60, "max_instances": 1}, - {"func": run_scheduled_jobs, "trigger": CronTrigger(day_of_week="*", hour=0, minute=15), - "misfire_grace_time": 20, "max_instances": 1}, - {"func": weekly_report, "trigger": CronTrigger(day_of_week="mon", hour=5), - "misfire_grace_time": 60 * 60, "max_instances": 1} - ] +SINGLE_CRONS = [ + {"func": telemetry_cron, "trigger": CronTrigger(day_of_week="*"), + "misfire_grace_time": 60 * 60, "max_instances": 1}, + {"func": run_scheduled_jobs, "trigger": CronTrigger(day_of_week="*", hour=0, minute=15), + "misfire_grace_time": 20, "max_instances": 1}, + {"func": weekly_report, "trigger": CronTrigger(day_of_week="mon", hour=5), + "misfire_grace_time": 60 * 60, "max_instances": 1} +] if config("LOCAL_CRONS", default=False, cast=bool): cron_jobs += SINGLE_CRONS