if ($source_param) { throw new ADEIException(translate("The source can't be specified in the parallel mode")); } unset($_SERVER['argv'][$pos]); $partype = "sources"; if ($pos + 1 < $params && substr($_SERVER['argv'][$pos + 1], 0, 1) != "-") { $partype = $_SERVER['argv'][$pos + 1]; unset($_SERVER['argv'][$pos + 1]); } $req = new REQUEST(); switch ($partype) { case "servers": $list = $req->GetServerList(); break; case "sources": $list = $req->GetSourceList($list_flags); break; case "groups": $list = $req->GetGroupList($list_flags); break; default: throw new ADEIException(translate("Unsupported type of parallelization (%s)", $partype)); } $params = implode(" ", $_SERVER['argv']); chdir($curdir); $procs = array(); foreach ($list as $item) { $source = "db_server={$item['db_server']}"; if (isset($item['db_name'])) { $source .= "&db_name={$item['db_name']}"; }
if ($source_param) { throw new ADEIException(translate("The source can't be specified in the parallel mode")); } unset($_SERVER['argv'][$pos]); $partype = "sources"; if ($pos + 1 < $params && substr($_SERVER['argv'][$pos + 1], 0, 1) != "-") { $partype = $_SERVER['argv'][$pos + 1]; unset($_SERVER['argv'][$pos + 1]); } $req = new REQUEST(); switch ($partype) { case "servers": $list = $req->GetServerList(); break; case "sources": $list = $req->GetSourceList(); break; case "groups": $list = $req->GetGroupList(); break; default: throw new ADEIException(translate("Unsupported type of parallelization (%s)", $partype)); } $params = implode(" ", $_SERVER['argv']); chdir($curdir); $procs = array(); foreach ($list as $item) { $source = "db_server={$item['db_server']}"; if (isset($item['db_name'])) { $source .= "&db_name={$item['db_name']}"; }