From a4fb5511d09a495e0d8b759756627f898999ea6d Mon Sep 17 00:00:00 2001 From: fernandoataoldotcom Date: Thu, 14 Sep 2023 23:55:23 +0000 Subject: [PATCH] feat(pull-request_bot): configure requeue wait --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ac5ac8d..2452a2a 100644 --- a/main.py +++ b/main.py @@ -56,6 +56,10 @@ 'CAPTAIN_DOMAIN_K8S_CONFIGMAP_NAME', 'glueops-captain-domain' ) +WATCH_FOR_APPS_DELAY_SECONDS =int(os.getenv( + 'WATCH_FOR_APPS_DELAY_SECONDS', + '10' +)) def get_captain_domain(): @@ -169,7 +173,7 @@ def main(): else: logger.info(f'SKIPPING. This app does not have the annotation preview_environment == true : {app["metadata"]["name"]}') # Sleep for some time before checking again - time.sleep(10) + time.sleep(WATCH_FOR_APPS_DELAY_SECONDS) def get_grafana_url_prefix(): return "https://grafana." + CAPTAIN_DOMAIN