From 6ad22e27660619e911a98f62a57e128214a40478 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Tue, 10 Apr 2018 16:04:45 +0200 Subject: reduce probability that okstate err gets blocked by other err; send okstate err twice --- it.class | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/it.class b/it.class index 54ac227..ef2b0ce 100644 --- a/it.class +++ b/it.class @@ -175,7 +175,7 @@ static function error($p = array()) 'graceperiod' => 60, 'timewindow' => 25*3600, 'backtraceskip' => 1, - 'blockmail' => 3600, + 'blockmail' => $p['okstate'] ? 60 : 3600, 'omitdebuginfo' => false, 'failcount' => 2, 'id' => $p['timewindow'] ? "it_error_id_" . it_debug::backtrace(['skipfiles' => "it.class", 'levels' => 1]) : 0, @@ -193,7 +193,7 @@ static function error($p = array()) list($okfn, $okstatus) = explode("=", "/tmp/alertdata/okstate_" . $p['okstate']); $failcount = $okstatus ? 0 : (int)@file_get_contents($okfn) + 1; file_put_contents($okfn, "$failcount\n"); - if ($failcount != $p['failcount']) + if ($failcount != $p['failcount'] && $failcount != $p['failcount'] * 2) return; } -- cgit v1.2.3