Skip to content

Commit

Permalink
Increase METRICS_CHECK_INTERVAL, add additional sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrotkk committed Nov 5, 2024
1 parent e3b49f2 commit 6998aa4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions metrics/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 6998aa4

Please sign in to comment.