简体   繁体   中英

Laravel 4.2 Queue::push IronMQ timeout option

I have searched around but unable to figure out how to pass an options array with queue::push to allow ironmq more time to process a queue as it takes longer than 60 seconds. When 60 seconds pass, it is firing the queue again. I have tried the following:

Queue::push("SomeClass@someMethod", array('variable' => $variable), null, array('timeout' => 3600));

Which I found described here: https://github.com/laravel/framework/pull/3555 which I was hoping that would work but doesn't. This is laravel 4.2 and just trying to pass a timeout option to ironmq.

Ok, so I reread the post from the link above and tried Taylor's suggestion and it worked for me. Here is what I did to prevent ironmq from firing the job again.

Route::post('queue/api', function()
{
    $response = Response::make("Skip Timeout", 200);
    $response->send();

    return Queue::marshal();
});

This prevents ironmq from firing the job again if it takes longer than 60 seconds.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM