From: Aaron Schulz Date: Fri, 4 Sep 2015 01:06:01 +0000 (-0700) Subject: poolcounter: PoolCounterRedis doc cleanups X-Git-Tag: 1.31.0-rc.0~10148^2 X-Git-Url: http://git.cyclocoop.org///%22%40url%40//%22?a=commitdiff_plain;h=f62bcacbc52cb40997603a01148ae5d4f596a902;p=lhc%2Fweb%2Fwiklou.git poolcounter: PoolCounterRedis doc cleanups Change-Id: I0266941c40d30f631ae77695cbe81bbdc2a85a79 --- diff --git a/includes/poolcounter/PoolCounterRedis.php b/includes/poolcounter/PoolCounterRedis.php index 98797a30a1..d7357cfe8e 100644 --- a/includes/poolcounter/PoolCounterRedis.php +++ b/includes/poolcounter/PoolCounterRedis.php @@ -76,7 +76,7 @@ class PoolCounterRedis extends PoolCounter { const AWAKE_ONE = 1; // wake-up if when a slot can be taken from an existing process const AWAKE_ALL = 2; // wake-up if an existing process finishes and wake up such others - /** @var array List of active PoolCounterRedis objects in this script */ + /** @var PoolCounterRedis[] List of active PoolCounterRedis objects in this script */ protected static $active = null; function __construct( $conf, $type, $key ) { @@ -121,7 +121,6 @@ class PoolCounterRedis extends PoolCounter { } function acquireForMe() { - $status = $this->precheckAcquire(); if ( !$status->isGood() ) { return $status; @@ -131,7 +130,6 @@ class PoolCounterRedis extends PoolCounter { } function acquireForAnyone() { - $status = $this->precheckAcquire(); if ( !$status->isGood() ) { return $status; @@ -141,7 +139,6 @@ class PoolCounterRedis extends PoolCounter { } function release() { - if ( $this->slot === null ) { return Status::newGood( PoolCounter::NOT_LOCKED ); // not locked } @@ -190,7 +187,7 @@ class PoolCounterRedis extends PoolCounter { return 1 LUA; try { - $res = $conn->luaEval( $script, + $conn->luaEval( $script, array( $this->getSlotListKey(), $this->getSlotRTimeSetKey(),