mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 05:32:20 +00:00
fix compatibility with phpredis
* implement a fork helper method that closes the connection to redis before forking (instead of resetting after) to work around bugs with phpredis/socket fork handling * phpredis does not automatically typecast to string, so worker name must be typecasted when registering
This commit is contained in:
parent
f082ec872e
commit
6800fbe5ac
3 changed files with 31 additions and 39 deletions
|
@ -68,7 +68,7 @@ if(!empty($COUNT) && $COUNT > 1) {
|
|||
|
||||
if($count > 1) {
|
||||
for($i = 0; $i < $count; ++$i) {
|
||||
$pid = pcntl_fork();
|
||||
$pid = Resque::fork();
|
||||
if($pid == -1) {
|
||||
die("Could not fork worker ".$i."\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue