- $this->out(sprintf('Relocation started from %s to %s. Could take a while to complete.', $this->baseUrl->get(true), $this->getArgument(0)));
+ $this->out(sprintf('Relocation started from %s to %s. Could take a while to complete.', $this->baseUrl, $this->getArgument(0)));
// Generate host names for relocation the addresses in the format user@address.tld
$new_host = str_replace('http://', '@', Strings::normaliseLink($new_url));
$old_host = str_replace('http://', '@', Strings::normaliseLink($old_url));
$this->out('Entering maintenance mode');
// Generate host names for relocation the addresses in the format user@address.tld
$new_host = str_replace('http://', '@', Strings::normaliseLink($new_url));
$old_host = str_replace('http://', '@', Strings::normaliseLink($old_url));
$this->out('Entering maintenance mode');
- $this->config->set('system', 'maintenance', true);
- $this->config->set('system', 'maintenance_reason', 'Relocating node to ' . $new_url);
-
+ $this->config->beginTransaction()
+ ->set('system', 'maintenance', true)
+ ->set('system', 'maintenance_reason', 'Relocating node to ' . $new_url)
+ ->commit();
try {
if (!$this->database->transaction()) {
throw new \Exception('Unable to start a transaction, please retry later.');
try {
if (!$this->database->transaction()) {
throw new \Exception('Unable to start a transaction, please retry later.');
// update config
$this->out('Updating config values');
$this->config->set('system', 'url', $new_url);
// update config
$this->out('Updating config values');
$this->config->set('system', 'url', $new_url);
- $this->config->set('system', 'maintenance', false);
- $this->config->set('system', 'maintenance_reason', '');
+ $this->config->beginTransaction()
+ ->set('system', 'maintenance', false)
+ ->delete('system', 'maintenance_reason')
+ ->commit();