]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Worker.php
Refactor dynamic App::getConfig() to static DI::config()
[friendica.git] / src / Core / Worker.php
index c64b0ebc6bdaa681e631e46e25dddb8526aa5bf2..a87fef07713b7055f4ccfb6e825e4d241254d6ad 100644 (file)
@@ -4,9 +4,9 @@
  */
 namespace Friendica\Core;
 
-use Friendica\BaseObject;
 use Friendica\Core;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Model\Process;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
@@ -1086,7 +1086,7 @@ class Worker
                $args = ['no_cron' => !$do_cron];
 
                $a = get_app();
-               $process = new Core\Process($a->getLogger(), $a->getMode(), $a->getConfig(), $a->getBasePath());
+               $process = new Core\Process($a->getLogger(), $a->getMode(), DI::config(), $a->getBasePath());
                $process->run($command, $args);
 
                // after spawning we have to remove the flag.
@@ -1232,11 +1232,11 @@ class Worker
         */
        public static function defer()
        {
-               if (empty(BaseObject::getApp()->queue)) {
+               if (empty(DI::app()->queue)) {
                        return false;
                }
 
-               $queue = BaseObject::getApp()->queue;
+               $queue = DI::app()->queue;
 
                $retrial = $queue['retrial'];
                $id = $queue['id'];