Skip to content

Commit

Permalink
Added wrapping array() to args to improve compatibility with ruby resque
Browse files Browse the repository at this point in the history
  • Loading branch information
warezthebeef committed Jul 21, 2011
1 parent 2a73e5b commit f7eac3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Resque/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function create($queue, $class, $args = null, $monitor = false)
$id = md5(uniqid('', true));
Resque::push($queue, array(
'class' => $class,
'args' => $args,
'args' => array($args),
'id' => $id,
));

Expand Down Expand Up @@ -128,7 +128,7 @@ public function getArguments()
return array();
}

return $this->payload['args'];
return array_shift($this->payload['args']);
}

/**
Expand Down Expand Up @@ -248,4 +248,4 @@ public function __toString()
return '(' . implode(' | ', $name) . ')';
}
}
?>
?>

0 comments on commit f7eac3b

Please sign in to comment.