From: Aaron Schulz Date: Thu, 5 Jun 2014 22:21:32 +0000 (-0700) Subject: Made pool counter better handled nested calls X-Git-Tag: 1.31.0-rc.0~15330^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dcompta/comptes/journal.php?a=commitdiff_plain;h=78a654eddc10df5c64cadd2f187e889f3fd4176e;p=lhc%2Fweb%2Fwiklou.git Made pool counter better handled nested calls * This is useful for the "GetLocalFileCopy" pool for example. Change-Id: Ie9f092fb595d12ebc6548571cecbd2f4251297db --- diff --git a/includes/poolcounter/PoolCounterWork.php b/includes/poolcounter/PoolCounterWork.php index 523e9e0194..1bc1a8b122 100644 --- a/includes/poolcounter/PoolCounterWork.php +++ b/includes/poolcounter/PoolCounterWork.php @@ -112,6 +112,10 @@ abstract class PoolCounterWork { } switch ( $status->value ) { + case PoolCounter::LOCK_HELD: + // Better to ignore nesting pool counter limits than to fail. + // Assume that the outer pool limiting is reasonable enough. + /* no break */ case PoolCounter::LOCKED: $result = $this->doWork(); $this->poolCounter->release();