I have a job in Laravel 5.5 that doesn't respect the value in the variable public $timeout
set on the job as described in the laravel documentation.
If I set the value of $timeout to, for example, 120 seconds I would expect the job to be terminated after it has ran for 120 seconds. I'm using RabbitMQ on a Heroku dyno.
Codebase: Laravel 5.5
Extension: RabbitMQ Queue driver for Laravel
Platform: Heroku dyno (Amazon).
Example code:
class ExampleJob implements ShouldQueue
{
use InteractsWithQueue, Queueable, SerializesModels;
public $timeout = 120;
public function handle()
{
DB::statement($this->buildCallStatement());
}
}
Example Procfile:
worker: php artisan queue:listen rabbitmq --queue=high,medium,low --tries=1 --memory=512 --timeout=0
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire