mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 13:42:22 +00:00
Merge pull request #107 from danhunsaker/feature-queue-failure
Added enqueue failure detection
This commit is contained in:
commit
37cdec8e11
2 changed files with 9 additions and 3 deletions
|
@ -58,11 +58,13 @@ class Resque_Job
|
|||
);
|
||||
}
|
||||
$id = md5(uniqid('', true));
|
||||
Resque::push($queue, array(
|
||||
if (!Resque::push($queue, array(
|
||||
'class' => $class,
|
||||
'args' => array($args),
|
||||
'id' => $id,
|
||||
));
|
||||
))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if($monitor) {
|
||||
Resque_Job_Status::create($id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue