X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fworker.php;h=2b5915f471d4fc76b9fdfdee1bad2ff42318cea0;hb=5e3a55915d7fdd554d711b2b5b619552a492c090;hp=553e9849774fe307e5f1535b9c090809ce043e80;hpb=6a9d73f7d9711bcd29142b8614fe6ddc09f4eae1;p=friendica.git diff --git a/bin/worker.php b/bin/worker.php index 553e984977..2b5915f471 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -10,7 +10,6 @@ use Friendica\Core\Config; use Friendica\Core\Update; use Friendica\Core\Worker; use Friendica\Factory; -use Friendica\Util\BasePath; // Get options $shortopts = 'sn'; @@ -31,15 +30,10 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) { require dirname(__DIR__) . '/vendor/autoload.php'; -$basedir = BasePath::create(dirname(__DIR__), $_SERVER); -$configLoader = new Config\ConfigCacheLoader($basedir); -$config = Factory\ConfigFactory::createCache($configLoader); -$logger = Factory\LoggerFactory::create('worker', $config); - -$a = new App($config, $logger); +$a = Factory\DependencyFactory::setUp('worker', dirname(__DIR__)); // Check the database structure and possibly fixes it -Update::check($a->getBasePath(), true); +Update::check($a->getBasePath(), true, $a->getMode()); // Quit when in maintenance if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) {