From acf8e396cdf63d4347893b398e2dbf4ee2e51c9b Mon Sep 17 00:00:00 2001 From: Ildar Iskhakov Date: Thu, 27 Jun 2024 16:33:13 +0800 Subject: [PATCH] Add START_SYNC_ORG_WITH_CHATOPS_PROXY_ENABLED (#4596) # What this PR does ## Which issue(s) this PR closes Closes [issue link here] ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- engine/settings/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/settings/base.py b/engine/settings/base.py index b2d519b7..d185d8bb 100644 --- a/engine/settings/base.py +++ b/engine/settings/base.py @@ -590,7 +590,8 @@ CELERY_BEAT_SCHEDULE = { }, } -if FEATURE_MULTIREGION_ENABLED: +START_SYNC_ORG_WITH_CHATOPS_PROXY_ENABLED = getenv_boolean("START_SYNC_ORG_WITH_CHATOPS_PROXY_ENABLED", default=False) +if FEATURE_MULTIREGION_ENABLED and START_SYNC_ORG_WITH_CHATOPS_PROXY_ENABLED: CELERY_BEAT_SCHEDULE["start_sync_org_with_chatops_proxy"] = { "task": "apps.chatops_proxy.tasks.start_sync_org_with_chatops_proxy", "schedule": crontab(hour="*/24"), # Every 24 hours, feel free to adjust