DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on • Updated on

Why laravel jobs are not being stopped even though I stop the supervisor?

Hello guys I notice a weird behavior on laravel jobs. I try gracefully to stop them via supervisorctl but the jobs keep running!!!!

But, once I get the Laravel application down I manage to stop jobs to being dispatched. Do you have any idea why?

I have the following supervisor.conf that is used to run my jobs:

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command= php artisan queue:work --sleep=5 --tries=5
autostart=true
autorestart=true
numprocs=4
stopwaitsecs=5
redirect_stderr=true
stdout_logfile=/home/ubuntu/laravel-worker.log

And I run the following job:

namespace App\Jobs;

use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

class DelayJobTestJob  implements ShouldQueue

Top comments (0)