use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\Worker;
+use Friendica\Core\Update;
+use Friendica\Util\LoggerFactory;
// Get options
$shortopts = 'sn';
chdir($directory);
}
-require_once "boot.php";
+require dirname(__DIR__) . '/vendor/autoload.php';
-$a = new App(dirname(__DIR__));
+$logger = LoggerFactory::create('worker');
+
+$a = new App(dirname(__DIR__), $logger);
// Check the database structure and possibly fixes it
-check_db(true);
+Update::check(true);
// Quit when in maintenance
if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) {
if ($spawn) {
Worker::spawnWorker();
- killme();
+ exit();
}
$run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);