summaryrefslogtreecommitdiff
path: root/it.class
diff options
context:
space:
mode:
authorUrban Müller2018-04-10 16:04:45 +0200
committerUrban Müller2018-04-10 16:04:45 +0200
commit6ad22e27660619e911a98f62a57e128214a40478 (patch)
treeb264e1493ffc1fa57b021b1d88466bd1d852a909 /it.class
parent924650fb1754c4821b4c786b5a9247182fb78356 (diff)
downloaditools-6ad22e27660619e911a98f62a57e128214a40478.tar.gz
itools-6ad22e27660619e911a98f62a57e128214a40478.tar.bz2
itools-6ad22e27660619e911a98f62a57e128214a40478.zip
reduce probability that okstate err gets blocked by other err; send okstate err twice
Diffstat (limited to 'it.class')
-rw-r--r--it.class4
1 files 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;
}