I'm setting up the Queue in L4 for the first time and i encountered some problems. I have i simple controller method like this:
public function getIndex()
{
$data = array(
'offset' => 3300000,
'site' => 1
);
Queue::push('Class@jobmethod', $data);
return 'OK!';
}
At the bottom of the job method, i do something like this:
public function jobmethod()
{
....
$data = array(
'offset' => $data['offset'] + 100,
'site' => $data['site']
);
Queue::push('Class@jobmethod', $data);
$job->delete();
}
So the job loops through the queue once again with a higher offset. Now my problem is that when i call the controller method in my browser, it will never return OK!, but just keep loading the page? I set the job up to log in a DB table and i can see that it keeps running several times.
Does anyone have an idea on whats going on here?