Skip to content

Commit f7eac3b

Browse files
committed
Added wrapping array() to args to improve compatibility with ruby resque
1 parent 2a73e5b commit f7eac3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Resque/Job.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static function create($queue, $class, $args = null, $monitor = false)
6363
$id = md5(uniqid('', true));
6464
Resque::push($queue, array(
6565
'class' => $class,
66-
'args' => $args,
66+
'args' => array($args),
6767
'id' => $id,
6868
));
6969

@@ -128,7 +128,7 @@ public function getArguments()
128128
return array();
129129
}
130130

131-
return $this->payload['args'];
131+
return array_shift($this->payload['args']);
132132
}
133133

134134
/**
@@ -248,4 +248,4 @@ public function __toString()
248248
return '(' . implode(' | ', $name) . ')';
249249
}
250250
}
251-
?>
251+
?>

0 commit comments

Comments
 (0)