]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Console/PostUpdate.php
Merge pull request #6611 from annando/worker-performance
[friendica.git] / src / Core / Console / PostUpdate.php
index a77aae39de58a7891eab17de70e31ad01d66e8ff..103d0fef7e68062928cdfd79100234a8dfd0187d 100644 (file)
@@ -2,8 +2,9 @@
 
 namespace Friendica\Core\Console;
 
-use Friendica\Core\L10n;
 use Friendica\Core\Config;
+use Friendica\Core\L10n;
+use Friendica\Core\Update;
 
 /**
  * Performs database post updates
@@ -33,7 +34,7 @@ HELP;
 
        protected function doExecute()
        {
-               $a = get_app();
+               $a = \Friendica\BaseObject::getApp();
 
                if ($this->getOption($this->helpOptions)) {
                        $this->out($this->getHelp());
@@ -50,10 +51,14 @@ HELP;
                        return 0;
                }
 
-               if (App\Mode::isInstall()) {
+               if ($a->getMode()->isInstall()) {
                        throw new \RuntimeException('Database isn\'t ready or populated yet');
                }
 
+               echo L10n::t('Check for pending update actions.') . "\n";
+               Update::run($a->getBasePath(), true, true, false);
+               echo L10n::t('Done.') . "\n";
+
                echo L10n::t('Execute pending post updates.') . "\n";
 
                while (!\Friendica\Database\PostUpdate::update()) {