diff --git a/lib/Resque/Job.php b/lib/Resque/Job.php index 69322f6..e1e51c2 100755 --- a/lib/Resque/Job.php +++ b/lib/Resque/Job.php @@ -93,7 +93,7 @@ class Resque_Job */ public static function reserve($queue) { - $payload = Resque::pop($queue); + $payload = Resque::pop($queue); if(!is_array($payload)) { return false; } @@ -112,7 +112,6 @@ class Resque_Job public static function reserveBlocking(array $queues, $timeout = null) { $item = Resque::blpop($queues, $timeout); - if(!is_array($item)) { return false; } diff --git a/test/Resque/Tests/JobStatusTest.php b/test/Resque/Tests/JobStatusTest.php index d3ab197..36729dd 100644 --- a/test/Resque/Tests/JobStatusTest.php +++ b/test/Resque/Tests/JobStatusTest.php @@ -36,6 +36,7 @@ class Resque_Tests_JobStatusTest extends Resque_Tests_TestCase $token = Resque::enqueue('jobs', 'Test_Job', null, true); $job = Resque_Job::reserve('jobs'); $this->assertEquals(Resque_Job_Status::STATUS_WAITING, $job->getStatus()); + } public function testQueuedJobReturnsQueuedStatus()