diff options
author | Urban Müller | 2018-04-10 16:04:45 +0200 |
---|---|---|
committer | Urban Müller | 2018-04-10 16:04:45 +0200 |
commit | 6ad22e27660619e911a98f62a57e128214a40478 (patch) | |
tree | b264e1493ffc1fa57b021b1d88466bd1d852a909 /it.class | |
parent | 924650fb1754c4821b4c786b5a9247182fb78356 (diff) | |
download | itools-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.class | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; } |