chore(build): testing EE cron-Jobs

This commit is contained in:
Taha Yassine Kraiem 2023-04-12 16:36:51 +01:00 committed by rjshrjndrn
parent 24c822c64e
commit 668b9cb383
2 changed files with 9 additions and 7 deletions

View file

@ -10,6 +10,7 @@ on:
branches: branches:
- dev - dev
- api-* - api-*
- v1.11.0-patch
paths: paths:
- "ee/api/**" - "ee/api/**"
- "api/**" - "api/**"

View file

@ -28,13 +28,14 @@ cron_jobs = [
{"func": unlock_cron, "trigger": CronTrigger(day="*")}, {"func": unlock_cron, "trigger": CronTrigger(day="*")},
] ]
SINGLE_CRONS = [{"func": telemetry_cron, "trigger": CronTrigger(day_of_week="*"), SINGLE_CRONS = [
"misfire_grace_time": 60 * 60, "max_instances": 1}, {"func": telemetry_cron, "trigger": CronTrigger(day_of_week="*"),
{"func": run_scheduled_jobs, "trigger": CronTrigger(day_of_week="*", hour=0, minute=15), "misfire_grace_time": 60 * 60, "max_instances": 1},
"misfire_grace_time": 20, "max_instances": 1}, {"func": run_scheduled_jobs, "trigger": CronTrigger(day_of_week="*", hour=0, minute=15),
{"func": weekly_report, "trigger": CronTrigger(day_of_week="mon", hour=5), "misfire_grace_time": 20, "max_instances": 1},
"misfire_grace_time": 60 * 60, "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): if config("LOCAL_CRONS", default=False, cast=bool):
cron_jobs += SINGLE_CRONS cron_jobs += SINGLE_CRONS