From 17f2110a6b67ce35d7785aca39d6ef42dfbb7cf5 Mon Sep 17 00:00:00 2001 From: Phillip Jensen Date: Tue, 8 Oct 2024 08:33:25 +0200 Subject: [PATCH] scheduling updates --- stats-backend/api2/tasks.py | 1 - stats-backend/core/celery.py | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/stats-backend/api2/tasks.py b/stats-backend/api2/tasks.py index b76d4e4..b0822a1 100644 --- a/stats-backend/api2/tasks.py +++ b/stats-backend/api2/tasks.py @@ -1902,7 +1902,6 @@ def fetch_and_update_relay_nodes_online_status(): missing_nodes = previously_online - current_online_nodes if missing_nodes: check_missing_nodes.delay(list(missing_nodes)) - fetch_and_update_relay_nodes_online_status.apply_async(countdown=15) @app.task diff --git a/stats-backend/core/celery.py b/stats-backend/core/celery.py index ec653b6..c685939 100644 --- a/stats-backend/core/celery.py +++ b/stats-backend/core/celery.py @@ -76,9 +76,15 @@ def setup_periodic_tasks(sender, **kwargs): extract_wallets_and_ids, fetch_and_update_relay_nodes_online_status, ) - fetch_and_update_relay_nodes_online_status.delay() v2_offer_scraper.apply_async(args=["ray-on-golem-heads"], queue="yagna", routing_key="yagna") v2_offer_scraper.apply_async(queue="yagna", routing_key="yagna") + + sender.add_periodic_task( + 45, + fetch_and_update_relay_nodes_online_status.s(), + queue="default", + options={"queue": "default", "routing_key": "default"}, + ) sender.add_periodic_task( 60, computing_total_over_time.s(),