summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-10-21 09:17:38 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-10-21 09:17:38 +0200
commit9200bbeabad801d54f69a1fedf23292afda27521 (patch)
treeae56f57aecd475169367f92cc692541e3b9a3c6f /core
parent74f41349b76e258e17fe4a39d7845fdcca3d554f (diff)
downloadnextcloud-server-9200bbeabad801d54f69a1fedf23292afda27521.tar.gz
nextcloud-server-9200bbeabad801d54f69a1fedf23292afda27521.zip
Update: state which step we are going to start and warn if it might be slow
Diffstat (limited to 'core')
-rw-r--r--core/ajax/update.php12
-rw-r--r--core/command/upgrade.php12
2 files changed, 24 insertions, 0 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 11d159f15d1..dfec64cd2cf 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -68,12 +68,24 @@ if (OC::checkUpgrade(false)) {
$updater->listen('\OC\Updater', 'maintenanceActive', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Maintenance mode is kept active'));
});
+ $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Updating database schema'));
+ });
$updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Updated database'));
});
+ $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Checking whether the database schema can be updated (this can take a long time depending on the database size)'));
+ });
$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checked database schema update'));
});
+ $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Checking updates of apps'));
+ });
+ $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($eventSource, $l) {
+ $eventSource->send('success', (string)$l->t('Checking whether the database schema for %s can be updated (this can take a long time depending on the database size)', [$app]));
+ });
$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Checked database schema update for apps'));
});
diff --git a/core/command/upgrade.php b/core/command/upgrade.php
index 5d4819f6baf..9c313f83e14 100644
--- a/core/command/upgrade.php
+++ b/core/command/upgrade.php
@@ -155,9 +155,15 @@ class Upgrade extends Command {
}
$output->writeln($message);
});
+ $updater->listen('\OC\Updater', 'dbUpgradeBefore', function () use($output) {
+ $output->writeln('<info>Updating database schema</info>');
+ });
$updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) {
$output->writeln('<info>Updated database</info>');
});
+ $updater->listen('\OC\Updater', 'dbSimulateUpgradeBefore', function () use($output) {
+ $output->writeln('<info>Checking whether the database schema can be updated (this can take a long time depending on the database size)</info>');
+ });
$updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) {
$output->writeln('<info>Checked database schema update</info>');
});
@@ -176,6 +182,12 @@ class Upgrade extends Command {
$updater->listen('\OC\Updater', 'repairError', function ($app) use($output) {
$output->writeln('<error>Repair error: ' . $app . '</error>');
});
+ $updater->listen('\OC\Updater', 'appUpgradeCheckBefore', function () use ($output) {
+ $output->writeln('<info>Checking updates of apps</info>');
+ });
+ $updater->listen('\OC\Updater', 'appSimulateUpdate', function ($app) use ($output) {
+ $output->writeln("<info>Checking whether the database schema for <$app> can be updated (this can take a long time depending on the database size)</info>");
+ });
$updater->listen('\OC\Updater', 'appUpgradeCheck', function () use ($output) {
$output->writeln('<info>Checked database schema update for apps</info>');
});