Skip to content

Commit

Permalink
Merge pull request #78 from skalenetwork/fix-metrics-collector
Browse files Browse the repository at this point in the history
Increase METRICS_CHECK_INTERVAL, add additional sleep
  • Loading branch information
dmytrotkk authored Nov 5, 2024
2 parents 67f8174 + 6998aa4 commit fb68808
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 fb68808

Please sign in to comment.