Skip to content

Commit

Permalink
Add toggle for profilings job (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
trent-codecov committed May 6, 2024
1 parent 5be9dcb commit c398e4b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions celery_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,6 @@ def _beat_schedule():
"cron_task_generation_time_iso": BeatLazyFunc(get_utc_now_as_iso_format)
},
},
"find_uncollected_profilings": {
"task": profiling_finding_task_name,
"schedule": crontab(minute="0,15,30,45"),
"kwargs": {
"cron_task_generation_time_iso": BeatLazyFunc(get_utc_now_as_iso_format)
},
},
"github_app_webhooks_task": {
"task": gh_app_webhook_check_task_name,
"schedule": crontab(minute="0", hour="0,6,12,18"),
Expand All @@ -150,6 +143,15 @@ def _beat_schedule():
},
}

if get_config("setup", "find_uncollected_profilings", "enabled", default=True):
beat_schedule["find_uncollected_profilings"] = {
"task": profiling_finding_task_name,
"schedule": crontab(minute="0,15,30,45"),
"kwargs": {
"cron_task_generation_time_iso": BeatLazyFunc(get_utc_now_as_iso_format)
},
}

if get_config("setup", "health_check", "enabled", default=False):
beat_schedule["health_check_task"] = {
"task": health_check_task_name,
Expand Down

0 comments on commit c398e4b

Please sign in to comment.