Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #30 from salimane/upstream

replace is_object with is_array when reserving jobs
  • Loading branch information...
commit 4700375d25efe8853eb88f2edc2d9b60f046b27f 2 parents cd47df2 + 7a7cfbf
@chrisboulton authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 lib/Resque.php
  2. +2 −2 lib/Resque/Job.php
View
6 lib/Resque.php
@@ -60,7 +60,7 @@ public static function redis()
* exist, then create it as well.
*
* @param string $queue The name of the queue to add the job to.
- * @param object $item Job description as an object to be JSON encoded.
+ * @param array $item Job description as an array to be JSON encoded.
*/
public static function push($queue, $item)
{
@@ -73,7 +73,7 @@ public static function push($queue, $item)
* return it.
*
* @param string $queue The name of the queue to fetch an item from.
- * @return object Decoded item from the queue.
+ * @return array Decoded item from the queue.
*/
public static function pop($queue)
{
@@ -113,7 +113,7 @@ public static function enqueue($queue, $class, $args = null, $trackStatus = fals
'args' => $args,
));
}
-
+
return $result;
}
View
4 lib/Resque/Job.php
@@ -37,7 +37,7 @@ class Resque_Job
* Instantiate a new instance of a job.
*
* @param string $queue The queue that the job belongs to.
- * @param object $payload Object containing details of the job.
+ * @param array $payload array containing details of the job.
*/
public function __construct($queue, $payload)
{
@@ -84,7 +84,7 @@ public static function create($queue, $class, $args = null, $monitor = false)
public static function reserve($queue)
{
$payload = Resque::pop($queue);
- if(!is_object($payload)) {
+ if(!is_array($payload)) {
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.