mirror of
https://github.com/idanoo/php-resque
synced 2025-06-30 21:22:20 +00:00
Move declare(ticks = 1) to startup
Having declare(ticks = 1) inside registerSigHandlers() worked perfectly on PHP 5.6 but it doesn't on PHP 7. I found it that moving the declare(ticks = 1) outside registerSigHandlers() solves the issue.
This commit is contained in:
parent
ab07fda51c
commit
16f88a6a38
1 changed files with 2 additions and 1 deletions
|
@ -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'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue