mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
Trying to pass builds..
This commit is contained in:
parent
44413588f4
commit
1085ac2412
@ -93,7 +93,7 @@ class Resque_Job
|
|||||||
*/
|
*/
|
||||||
public static function reserve($queue)
|
public static function reserve($queue)
|
||||||
{
|
{
|
||||||
$payload = Resque::pop($queue);
|
$payload = Resque::pop($queue);
|
||||||
if(!is_array($payload)) {
|
if(!is_array($payload)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -112,7 +112,6 @@ class Resque_Job
|
|||||||
public static function reserveBlocking(array $queues, $timeout = null)
|
public static function reserveBlocking(array $queues, $timeout = null)
|
||||||
{
|
{
|
||||||
$item = Resque::blpop($queues, $timeout);
|
$item = Resque::blpop($queues, $timeout);
|
||||||
|
|
||||||
if(!is_array($item)) {
|
if(!is_array($item)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ class Resque_Tests_JobStatusTest extends Resque_Tests_TestCase
|
|||||||
$token = Resque::enqueue('jobs', 'Test_Job', null, true);
|
$token = Resque::enqueue('jobs', 'Test_Job', null, true);
|
||||||
$job = Resque_Job::reserve('jobs');
|
$job = Resque_Job::reserve('jobs');
|
||||||
$this->assertEquals(Resque_Job_Status::STATUS_WAITING, $job->getStatus());
|
$this->assertEquals(Resque_Job_Status::STATUS_WAITING, $job->getStatus());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testQueuedJobReturnsQueuedStatus()
|
public function testQueuedJobReturnsQueuedStatus()
|
||||||
|
Loading…
Reference in New Issue
Block a user