Commit 41e0ad41 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed signal handler for request fetcher

parent 64c9ca7a
......@@ -55,9 +55,7 @@ class RequestFetcher extends Command
*/
public function handle()
{
pcntl_signal(SIGINT, [$this, "sig_handler"]);
pcntl_signal(SIGTERM, [$this, "sig_handler"]);
pcntl_signal(SIGHUP, [$this, "sig_handler"]);
pcntl_signal(SIGQUIT, [$this, "sig_handler"]);
// Redis might not be available now
for ($count = 0; $count < 10; $count++) {
......@@ -233,6 +231,7 @@ class RequestFetcher extends Command
public function sig_handler($sig)
{
$this->info("Received Shutdown signal");
$this->shouldRun = false;
echo ("Terminating Process\n");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment