public function task($data, $workerId = -1, $callback = null, $serverId = -1, $serverGroup = null)
{
if (Server::$clustersType < 2) {
# 非高级集群模式
return $this->server->task($data, $workerId, $callback);
} else {
# 高级集群模式
$client = Clusters\Client::getClient($serverGroup, $serverId, $workerId, true);
if (!$client) {
$this->debug('get task client error');
return false;
}
return $client->sendData('task', $data, $this->name, $callback);
}
}