shutdown() on SIGINT pcntl_signal(SIGTERM, [$this, 'shutdown']); // Call $this->shutdown() on SIGTERM $this->info('Worker started'); // 33 Class Illuminate\Queue\Worker constructor invoked with 0 parameters, 4-5 required. $worker = new Worker(); while ($this->run) { // 35 Call to an undefined method Illuminate\Queue\Worker::work(). $worker->work(); } $this->info('Worker stopped'); } public function shutdown() { $this->info('Gracefully stopping worker...'); // When set to false, worker will finish current item and stop. $this->run = false; } }