Comment 4 for bug 1118751

Revision history for this message
peterfirst (peterfirst) wrote :

Solved the connection problem as follows:

$servers = ["gearman1.local", "gearman2.local"];

$serversAdded = 0;

foreach ( $servers as $server ) {
    $serversAdded += (int) GermanClient::addServers($server)
}

if ( $server < 1 ){
        error_log("Can't add one or more servers to gearman client");
       // throw exception or handle the case
}

Note:
1. GearmanClient::addServer() will only add it to list and not validate.