This relates to laravel 5.3, beanstalk, ttr and timeout working with Queue's and QueueWorkers. TTR: https://github.com/kr/beanstalkd/wiki/faq
If I understand correctly a job from the Queue gets the state reserved when a QueueWorker is picking it. This job state will be changed back to ready when the ttr runs out. But what happens with the QueueWorker?
Let's say the QueueWorker has a timeout set to 600 by the following command:
php artisan queue:work --tries=1 --timeout=600 --sleep=0
ttr is, as default, set to 60 seconds.
During the job a request is done to another site and it takes 120 seconds till response. After 60 seconds the job is set back to the ready state because the TTR. Will the QueueWorker keep working on the job till response has been received, maximum of 600 seconds? Or will the QueueWorker stop working on the job when TTR has been reached?
Actually, the QueueWorker will run till the job is completed. When you run queue worker without the daemon flag, it will run the code below:
Reference: https://github.com/laravel/framework/blob/5.2/src/Illuminate/Queue/Console/WorkCommand.php#L123
What this code does is pop its job from the queue and fire that job as a command:
Reference: https://github.com/laravel/framework/blob/5.2/src/Illuminate/Queue/Worker.php#L213
Digging in the source for more information: https://github.com/laravel/framework/tree/5.2/src/Illuminate/Queue