Skip to content

Commit

Permalink
Enabling the usage of "worker_dir" as array ( PHP Config File )
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan de Souza committed Dec 27, 2013
1 parent ebb902b commit 409964c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GearmanManager.php
Expand Up @@ -514,7 +514,7 @@ protected function getopt() {
$this->worker_dir = "./workers";
}

$dirs = explode(",", $this->worker_dir);
$dirs = is_array($this->worker_dir) ? $this->worker_dir : explode(",", $this->worker_dir);
foreach($dirs as &$dir){
$dir = trim($dir);
if(!file_exists($dir)){
Expand Down Expand Up @@ -615,7 +615,7 @@ protected function load_workers() {

$this->functions = array();

$dirs = explode(",", $this->worker_dir);
$dirs = is_array($this->worker_dir) ? $this->worker_dir : explode(",", $this->worker_dir);

foreach($dirs as $dir){

Expand Down

0 comments on commit 409964c

Please sign in to comment.