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:
Chris Boulton 2013-01-13 02:59:06 +11:00
parent f082ec872e
commit 6800fbe5ac
3 changed files with 31 additions and 39 deletions

View file

@ -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");
}