Commit fb78e23b authored by Adrian Rossouw's avatar Adrian Rossouw

Merge branch 'master' of ssh://git.aegirproject.org/provision

parents 2edd9372 3fd1b0ed
......@@ -11,41 +11,42 @@ class provisionService_http_cluster extends provisionService_http {
$this->server->setProperty('cluster_web_servers', array(), TRUE);
}
function _each_server($method) {
function _each_server($method, $args = array()) {
foreach ($this->server->cluster_web_servers as $server) {
d($server)->service('http')->$method();
call_user_func_array(array(d($server)->service('http'), $method), $args);
}
}
function _one_server($method) {
d($this->cluster_web_servers[0])->service('http')->$method();
}
function parse_configs() {
$this->_each_server(__FUNCTION__);
}
function create_site_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function delete_site_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function create_platform_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function delete_platform_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function create_server_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function delete_server_config() {
$this->_one_server(__FUNCTION__);
$this->_each_server(__FUNCTION__);
}
function sync() {
$args = func_get_args();
$this->_each_server(__FUNCTION__, $args);
}
}
......@@ -399,7 +399,7 @@ class provisionServer extends provisionEnvironment {
drush_log(dt('@path has been synced to remote server @remote_host.', array('@path' => $path, '@remote_host' => $this->remote_host)));
}
else {
drush_set_error('PROVISION_FILE_SYNC_FAILED', dt('Files could not be synced to remote server @remote_host. Changes might not be available until this has been done. (error: %msg)', array('@path' => $path, '@remote_host' => $this->remote_host, '%msg' => join("\n", drush_shell_exec_output()))));
drush_set_error('PROVISION_FILE_SYNC_FAILED', dt('@path could not be synced to remote server @remote_host. Changes might not be available until this has been done. (error: %msg)', array('@path' => $path, '@remote_host' => $this->remote_host, '%msg' => join("\n", drush_shell_exec_output()))));
}
}
else { // File does not exist, remove it.
......@@ -407,7 +407,7 @@ class provisionServer extends provisionEnvironment {
drush_log(dt('@path has been removed from remote server @remote_host.', array('@path' => $path, '@remote_host' => $this->remote_host)));
}
else {
drush_set_error('PROVISION_FILE_SYNC_FAILED', dt('Files could not be removed from remote server @remote_host. Changes might not be available until this has been done. (error: %msg)', array('@path' => $path, '@remote_host' => $this->remote_host, '%msg' => join("\n", drush_shell_exec_output()))));
drush_set_error('PROVISION_FILE_SYNC_FAILED', dt('@path could not be removed from remote server @remote_host. Changes might not be available until this has been done. (error: %msg)', array('@path' => $path, '@remote_host' => $this->remote_host, '%msg' => join("\n", drush_shell_exec_output()))));
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment