Module: check_mk
Branch: master
Commit: e890a9facffe855735ff6e208b6996d2ae9bfffe
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=e890a9facffe85…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Sun Aug 14 15:46:30 2011 +0200
Reschedule button: force sleep of .7sec for Check_MK
---
ChangeLog | 2 ++
web/htdocs/actions.py | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4e57ec9..063c29e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,8 @@
* Detail views of host/service now show contacts
* Fix playing of sounds: All problem views now have play_sounds activated,
all other deactivated.
+ * Rescheduling of Check_MK: introduce a short sleep of 0.7 sec. This increases
+ the chance of the passive services being updated before the repaint.
WATO:
* Configration files can now be administered via the WEB UI
diff --git a/web/htdocs/actions.py b/web/htdocs/actions.py
index 6316597..f1060f8 100644
--- a/web/htdocs/actions.py
+++ b/web/htdocs/actions.py
@@ -77,6 +77,12 @@ def action_reschedule():
html.write("['TIMEOUT', 'Check not executed within %d
seconds']\n" % (config.reschedule_timeout))
else:
+ if service == "Check_MK":
+ # Passive services triggered by Check_MK often are updated
+ # a few ms later. We introduce a small wait time in order
+ # to increase the chance for the passive services already
+ # updated also when we return.
+ time.sleep(0.7);
html.write("['OK', %d, %d, %r]\n" % (row[0], row[1],
row[2].encode("utf-8")))
except Exception, e: