X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fworker.php;h=2b5915f471d4fc76b9fdfdee1bad2ff42318cea0;hb=5e3a55915d7fdd554d711b2b5b619552a492c090;hp=9b396c6f9c5d978eeec51f570f55430970993854;hpb=cb1ad4287d114ef3c712aa2d163a7f80e9bd48f1;p=friendica.git diff --git a/bin/worker.php b/bin/worker.php index 9b396c6f9c..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,16 +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); -$profiler = Factory\ProfilerFactory::create($logger, $config); - -$a = new App($config, $logger, $profiler); +$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)) {