Kohkimakimoto\Worker\Worker::signalHandler PHP Method

signalHandler() public method

Signal handler
public signalHandler ( integer $signo ) : void
$signo integer
return void
    public function signalHandler($signo)
    {
        switch ($signo) {
            case SIGTERM:
                $this->output->writeln("<fg=red>Got SIGTERM.</fg=red>");
                $this->shutdown();
                exit;
            case SIGINT:
                $this->output->writeln("<fg=red>Got SIGINT.</fg=red>");
                $this->shutdown();
                exit;
        }
    }