modify plugin name
This commit is contained in:
@@ -65,8 +65,11 @@ class Pool extends Component
|
|||||||
public function check($name): array
|
public function check($name): array
|
||||||
{
|
{
|
||||||
$channel = $this->channel($name);
|
$channel = $this->channel($name);
|
||||||
$count = $success = 0;
|
if ($channel->length() < 1) {
|
||||||
|
return [0, 0];
|
||||||
|
}
|
||||||
|
|
||||||
|
$count = $success = 0;
|
||||||
$lists = [];
|
$lists = [];
|
||||||
while (($pdo = $channel->pop()) instanceof PDO) {
|
while (($pdo = $channel->pop()) instanceof PDO) {
|
||||||
$count += 1;
|
$count += 1;
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ class SplQueue implements QueueInterface
|
|||||||
public function pop(float $timeout = -1): mixed
|
public function pop(float $timeout = -1): mixed
|
||||||
{
|
{
|
||||||
// TODO: Implement pop() method.
|
// TODO: Implement pop() method.
|
||||||
|
if ($this->channel->count() < 1) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return $this->channel->dequeue();
|
return $this->channel->dequeue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user