-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pcntl_signal_dispatch(); missing #333
Comments
can you give some references to read and make a PR for this? |
@Hikariii in the method work in the workers for example this
if you no call the dispatch, if you fire a signal this keep waiting until you fire the dispatch for run in php |
@spiritdead @Hikariii I was running older version of php-resque and upgrading to PHP7 and found things not working, and suspected I need to do |
Note that PHP 7.x is not properly supported at this time, so YMMV. |
on PHP 7.1, the worker is getting stalled after performing the first job in the Queue. |
Careful with this, if you no have this function inside in the while of the worker whenyou generate the signal for shutdown, this never is fired, you have to call this function
pcntl_signal_dispatch(); //affected in ubuntu 16.04 (tested)
should be
while (true) {
if(function_exists('pcntl_signal_dispatch')) {
pcntl_signal_dispatch();
}
if ($this->shutdown) {
break;
}
The text was updated successfully, but these errors were encountered: