diff --git a/celery_config.py b/celery_config.py index 9c2209735..9b6f3e0bc 100644 --- a/celery_config.py +++ b/celery_config.py @@ -115,13 +115,6 @@ def _beat_schedule(): "cron_task_generation_time_iso": BeatLazyFunc(get_utc_now_as_iso_format) }, }, - "health_check_task": { - "task": health_check_task_name, - "schedule": timedelta(seconds=get_health_check_interval_seconds()), - "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"), @@ -139,6 +132,15 @@ def _beat_schedule(): }, } + if get_config("setup", "health_check", "enabled", default=False): + beat_schedule["health_check_task"] = { + "task": health_check_task_name, + "schedule": timedelta(seconds=get_health_check_interval_seconds()), + "kwargs": { + "cron_task_generation_time_iso": BeatLazyFunc(get_utc_now_as_iso_format) + }, + } + if get_config("setup", "telemetry", "enabled", default=True): beat_schedule["brolly_stats_rollup"] = { "task": brolly_stats_rollup_task_name, diff --git a/requirements.in b/requirements.in index 283233e99..eeb8ee70c 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -https://github.com/codecov/shared/archive/a4ccbbb66eef572719bf8f522b5c8805c72297a9.tar.gz#egg=shared +https://github.com/codecov/shared/archive/36cea1a0ec45a333fbbd0b89ae1ca3860e17e6d1.tar.gz#egg=shared https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem boto3 celery diff --git a/requirements.txt b/requirements.txt index 4bd40040c..efe8fbd7e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.9 # by the following command: # # pip-compile requirements.in @@ -120,6 +120,7 @@ grpcio==1.58.0 # via # google-api-core # google-cloud-pubsub + # googleapis-common-protos # grpc-google-iam-v1 # grpcio-status grpcio-status==1.58.0 @@ -283,7 +284,7 @@ s3transfer==0.3.4 # via boto3 sentry-sdk==1.19.1 # via -r requirements.in -shared @ https://github.com/codecov/shared/archive/a4ccbbb66eef572719bf8f522b5c8805c72297a9.tar.gz +shared @ https://github.com/codecov/shared/archive/36cea1a0ec45a333fbbd0b89ae1ca3860e17e6d1.tar.gz # via -r requirements.in six==1.15.0 # via