diff --git a/lib/Resque.php b/lib/Resque.php index 75b8d52..a463bea 100644 --- a/lib/Resque.php +++ b/lib/Resque.php @@ -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; } /** diff --git a/lib/Resque/Job.php b/lib/Resque/Job.php index fc84e1e..d2a4e84 100755 --- a/lib/Resque/Job.php +++ b/lib/Resque/Job.php @@ -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) {