mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
Updated to match coding style.
Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
This commit is contained in:
parent
3798fa3ba6
commit
8d1a9a5564
@ -98,11 +98,11 @@ class Resque
|
|||||||
public static function push($queue, $item)
|
public static function push($queue, $item)
|
||||||
{
|
{
|
||||||
self::redis()->sadd('queues', $queue);
|
self::redis()->sadd('queues', $queue);
|
||||||
if (self::redis()->rpush('queue:' . $queue, json_encode($item)) < 1)
|
$length = self::redis()->rpush('queue:' . $queue, json_encode($item));
|
||||||
{
|
if ($length < 1) {
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,13 +58,12 @@ class Resque_Job
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
$id = md5(uniqid('', true));
|
$id = md5(uniqid('', true));
|
||||||
if ( ! Resque::push($queue, array(
|
if (!Resque::push($queue, array(
|
||||||
'class' => $class,
|
'class' => $class,
|
||||||
'args' => array($args),
|
'args' => array($args),
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
)))
|
))) {
|
||||||
{
|
return false;
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($monitor) {
|
if($monitor) {
|
||||||
|
Loading…
Reference in New Issue
Block a user