X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=bin%2Fworker.php;h=2b5915f471d4fc76b9fdfdee1bad2ff42318cea0;hb=73835118550f4bf9c0df510283c905f89224d612;hp=0a9b4cb38be4c4ac5f34a0e0e3fa56460d1d4dcb;hpb=eafcf3592db02392770cdc88bed9ddb000cb44f2;p=friendica.git diff --git a/bin/worker.php b/bin/worker.php index 0a9b4cb38b..2b5915f471 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -7,11 +7,9 @@ use Friendica\App; use Friendica\Core\Config; -use Friendica\Core\Config\Cache; use Friendica\Core\Update; use Friendica\Core\Worker; use Friendica\Factory; -use Friendica\Util\BasePath; // Get options $shortopts = 'sn'; @@ -32,19 +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 Cache\ConfigCacheLoader($basedir); -$configCache = Factory\ConfigFactory::createCache($configLoader); -Factory\DBFactory::init($configCache, $_SERVER); -$config = Factory\ConfigFactory::createConfig($configCache); -$pconfig = Factory\ConfigFactory::createPConfig($configCache); -$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)) {