diff --git a/lib/Resque/Worker.php b/lib/Resque/Worker.php index 973d7fd..cd96062 100644 --- a/lib/Resque/Worker.php +++ b/lib/Resque/Worker.php @@ -311,6 +311,8 @@ class Resque_Worker */ private function startup() { + declare(ticks = 1); + $this->registerSigHandlers(); $this->pruneDeadWorkers(); Resque_Event::trigger('beforeFirstFork', $this); @@ -349,7 +351,6 @@ class Resque_Worker return; } - declare(ticks = 1); pcntl_signal(SIGTERM, array($this, 'shutDownNow')); pcntl_signal(SIGINT, array($this, 'shutDownNow')); pcntl_signal(SIGQUIT, array($this, 'shutdown'));