diff --git a/metrics/src/config.py b/metrics/src/config.py index fc2b07c..70e4b86 100644 --- a/metrics/src/config.py +++ b/metrics/src/config.py @@ -50,7 +50,7 @@ NGINX_WWW_FOLDER = os.path.join(PROJECT_PATH, 'www') METRICS_FILEPATH = os.path.join(NGINX_WWW_FOLDER, 'metrics.json') -METRICS_CHECK_INTERVAL = 300 +METRICS_CHECK_INTERVAL = 600 METRICS_ERROR_CHECK_INTERVAL = 30 API_ERROR_TIMEOUT = 2 API_ERROR_RETRIES = 3 diff --git a/metrics/src/main.py b/metrics/src/main.py index 62bdabb..0a1d558 100644 --- a/metrics/src/main.py +++ b/metrics/src/main.py @@ -64,6 +64,7 @@ def run_metrics_loop(): current_date = datetime.now().date() if last_run_date is None or current_date > last_run_date: + sleep(METRICS_CHECK_INTERVAL) logger.info(f'Daily metrics collection started for {NETWORK_NAME}...') try: with db.connection_context():