mirror of
https://github.com/idanoo/php-resque
synced 2025-06-30 21:22:20 +00:00
Unit tests pass
This commit is contained in:
parent
f379d3a36d
commit
bfbff5e58e
2 changed files with 15 additions and 4 deletions
|
@ -100,12 +100,13 @@ class Resque_Job
|
|||
*/
|
||||
public static function reserveBlocking(array $queues, $timeout = null)
|
||||
{
|
||||
$payload = Resque::blpop($queues, $timeout);
|
||||
if(!is_array($payload)) {
|
||||
$item = Resque::blpop($queues, $timeout);
|
||||
|
||||
if(!is_array($item)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return new Resque_Job($payload->queue, $payload);
|
||||
return new Resque_Job($item['queue'], $item['payload']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue