From b3ed6359ee4914be8ab3f5b0975850fca2cd831c Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.dos.anjos@gmail.com>
Date: Wed, 27 Apr 2016 14:31:34 +0200
Subject: [PATCH] [settings] Add flag to control worker state update

---
 beat/web/settings/settings.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/beat/web/settings/settings.py b/beat/web/settings/settings.py
index 71bd96920..536418962 100644
--- a/beat/web/settings/settings.py
+++ b/beat/web/settings/settings.py
@@ -219,6 +219,12 @@ SCHEDULING_INTERVAL  = 5 #seconds
 # a particular worker will run to verify jobs are not scheduled to itself
 WORKER_INTERVAL      = 5 #seconds
 
+# This is the frequency in seconds, in which the worker will update information
+# about its internal state to the database. It is typically larger (much
+# larger) than the WORKER_INTERVAL to avoid overloading the database with
+# unnecessary requests.
+WORKER_STATE_UPDATE  = 60 #seconds
+
 # The maximum index split errors control the maximum number of times we can
 # incur in an index split error condition without cancelling the block
 # execution altogether. This number, multiplied by the scheduling interval,
-- 
GitLab