Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions Classes/Queue/RedisQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,33 @@ public function peek($limit = 1)
/**
* @inheritdoc
*/
public function count()
public function countReady(): int
{
$this->checkClientConnection();
return $this->client->lLen("queue:{$this->name}:messages");
}

/**
* @inheritdoc
*/
public function countReserved(): int
{
$this->checkClientConnection();
return $this->client->lLen("queue:{$this->name}:processing");
}

/**
* @inheritdoc
*/
public function countFailed(): int
{
$this->checkClientConnection();
return $this->client->lLen("queue:{$this->name}:failed");
}

/**
* @return void
* @throws JobQueueException
*/
public function setUp()
{
Expand Down Expand Up @@ -279,4 +298,4 @@ protected function connectClient()
}
return $connected;
}
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"ext-redis": "*",
"flowpack/jobqueue-common": "^2.0"
"flowpack/jobqueue-common": "^3.0 || dev-master"
},
"autoload": {
"psr-4": {
Expand Down