diff --git a/resque.php b/resque.php index 4b7ab44..83b228b 100644 --- a/resque.php +++ b/resque.php @@ -1,43 +1,47 @@ 1) { - $count = $_ENV['COUNT']; +$COUNT = getenv('COUNT'); +if(!empty($COUNT) && $COUNT > 1) { + $count = $COUNT; } if($count > 1) { @@ -48,7 +52,7 @@ if($count > 1) { } // Child, start the worker else if(!$pid) { - $queues = explode(',', $_ENV['QUEUE']); + $queues = explode(',', $QUEUE); $worker = new Resque_Worker($queues); $worker->logLevel = $logLevel; fwrite(STDOUT, '*** Starting worker '.$worker."\n"); @@ -59,10 +63,10 @@ if($count > 1) { } // Start a single worker else { - $queues = explode(',', $_ENV['QUEUE']); + $queues = explode(',', $QUEUE); $worker = new Resque_Worker($queues); $worker->logLevel = $logLevel; fwrite(STDOUT, '*** Starting worker '.$worker."\n"); $worker->work($interval); } -?> \ No newline at end of file +?>