From edbbfff1afe5f137ec14a9dd38ac19f8a43c8293 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Tue, 23 Mar 2021 19:58:29 +1100 Subject: [PATCH] Reduce frequency of heartbeat --- InvenTree/InvenTree/apps.py | 2 +- InvenTree/InvenTree/status.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/InvenTree/InvenTree/apps.py b/InvenTree/InvenTree/apps.py index 6a2e363789..07f565e012 100644 --- a/InvenTree/InvenTree/apps.py +++ b/InvenTree/InvenTree/apps.py @@ -40,5 +40,5 @@ class InvenTreeConfig(AppConfig): InvenTree.tasks.schedule_task( 'InvenTree.tasks.heartbeat', schedule_type=Schedule.MINUTES, - minutes=5 + minutes=15 ) diff --git a/InvenTree/InvenTree/status.py b/InvenTree/InvenTree/status.py index 8c65bdc302..841a54f92b 100644 --- a/InvenTree/InvenTree/status.py +++ b/InvenTree/InvenTree/status.py @@ -29,12 +29,12 @@ def is_q_cluster_running(**kwargs): """ Sometimes Stat.get_all() returns []. - In this case we have the 'heartbeat' task running every five minutes. - Check to see if we have a result within the last ten minutes + In this case we have the 'heartbeat' task running every 15 minutes. + Check to see if we have a result within the last 20 minutes """ now = datetime.now() - past = now - timedelta(minutes=10) + past = now - timedelta(minutes=20) results = Success.objects.filter( func='InvenTree.tasks.heartbeat',