Updated to match coding style.

Signed-off-by: Daniel Hunsaker <danhunsaker@gmail.com>
This commit is contained in:
Daniel Hunsaker 2013-05-12 12:58:18 -06:00
parent 3798fa3ba6
commit 8d1a9a5564
2 changed files with 7 additions and 8 deletions

View File

@ -98,11 +98,11 @@ class Resque
public static function push($queue, $item)
{
self::redis()->sadd('queues', $queue);
if (self::redis()->rpush('queue:' . $queue, json_encode($item)) < 1)
{
return FALSE;
$length = self::redis()->rpush('queue:' . $queue, json_encode($item));
if ($length < 1) {
return false;
}
return TRUE;
return true;
}
/**

View File

@ -58,13 +58,12 @@ class Resque_Job
);
}
$id = md5(uniqid('', true));
if ( ! Resque::push($queue, array(
if (!Resque::push($queue, array(
'class' => $class,
'args' => array($args),
'id' => $id,
)))
{
return FALSE;
))) {
return false;
}
if($monitor) {