* @file bin/worker.php
* @brief Starts the background processing
*/
+
use Friendica\App;
use Friendica\Core\Config;
-use Friendica\Core\Worker;
use Friendica\Core\Update;
-use Friendica\Util\LoggerFactory;
+use Friendica\Core\Worker;
+use Friendica\Factory;
// Get options
$shortopts = 'sn';
require dirname(__DIR__) . '/vendor/autoload.php';
-$logger = LoggerFactory::create('worker');
-
-$a = new App(dirname(__DIR__), $logger);
+$a = Factory\DependencyFactory::setUp('worker', dirname(__DIR__));
// Check the database structure and possibly fixes it
-Update::check(true);
+Update::check($a->getBasePath(), true, $a->getMode());
// Quit when in maintenance
if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) {