From: Aaron Schulz Date: Tue, 18 Mar 2014 17:16:58 +0000 (-0700) Subject: Lowered high lock timeout in mergeViaLock() and lock() in BagOStuff X-Git-Tag: 1.31.0-rc.0~16506 X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=commitdiff_plain;h=587a98aa02351b5a27145e92d3827a0945b70a41;p=lhc%2Fweb%2Fwiklou.git Lowered high lock timeout in mergeViaLock() and lock() in BagOStuff Change-Id: Ib5cd0a98ce6ec47edb24f8cc9f4df2c941ce1c38 --- diff --git a/includes/objectcache/BagOStuff.php b/includes/objectcache/BagOStuff.php index 4a27692f08..217142c0b4 100644 --- a/includes/objectcache/BagOStuff.php +++ b/includes/objectcache/BagOStuff.php @@ -142,7 +142,7 @@ abstract class BagOStuff { * @return bool success */ protected function mergeViaLock( $key, closure $callback, $exptime = 0, $attempts = 10 ) { - if ( !$this->lock( $key, 60 ) ) { + if ( !$this->lock( $key, 6 ) ) { return false; } @@ -168,7 +168,7 @@ abstract class BagOStuff { * @param $timeout integer [optional] * @return bool success */ - public function lock( $key, $timeout = 60 ) { + public function lock( $key, $timeout = 6 ) { $timestamp = microtime( true ); // starting UNIX timestamp if ( $this->add( "{$key}:lock", 1, $timeout ) ) { return true;