diff options
author | Urban Müller | 2019-02-18 14:02:38 +0100 |
---|---|---|
committer | Urban Müller | 2019-02-18 14:02:38 +0100 |
commit | 9f4b7a4988470297dae630cc7ade34f033fc56cb (patch) | |
tree | a76c4c07a2c352cd4ef8645cde486574f374d022 | |
parent | b8006fd12510e4056fb901b42a4d800deee316be (diff) | |
download | itools-9f4b7a4988470297dae630cc7ade34f033fc56cb.tar.gz itools-9f4b7a4988470297dae630cc7ade34f033fc56cb.tar.bz2 itools-9f4b7a4988470297dae630cc7ade34f033fc56cb.zip |
fewer err if one host is down
-rw-r--r-- | it_cache.class | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/it_cache.class b/it_cache.class index 2186af3..bed0cd9 100644 --- a/it_cache.class +++ b/it_cache.class @@ -86,7 +86,13 @@ static function put($key, $value, $p = array()) $success = ($func = self::$_store_func) ? $func($key, $value, $p['ttl']) : null; if (!$success && $p['safety'] == 1) - it::error(['title' => ($p['distributed'] ? "memcache (" . ($memcache ? ($memcache->getResultMessage() . " on " . $memcache->getServerByKey($key)['host']) : "n/a") . ")" : self::$_store_func) . " in it_cache::put failed", 'body' => "key='$key'", 'timewindow' => "1200-1220"]); + it::error(array_filter([ + 'title' => ($p['distributed'] ? "memcache (" . ($memcache ? ($memcache->getResultMessage() . " on " . $memcache->getServerByKey($key)['host']) : "n/a") . ")" : self::$_store_func) . " in it_cache::put failed", + 'body' => "key='$key'", + 'timewindow' => "1200-1220", + 'blockmailid' => $memcache ? "memcache_on_" . $memcache->getServerByKey($key)['host'] : null, + 'blockmail' => $memcache? 12*3600 : null, + ])); $GLOBALS['it_cache_local'][$key] = $value; # Also store local copy |