]> git.mxchange.org Git - friendica.git/blobdiff - bin/worker.php
[frio] Fix help TOC display
[friendica.git] / bin / worker.php
index d5cd1f6b4b7cc56492e770a3f53d51214d11acfa..a64b6a83305660f705bf5530141061ddcf379269 100755 (executable)
@@ -7,6 +7,8 @@
 use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\Worker;
+use Friendica\Core\Update;
+use Friendica\Util\LoggerFactory;
 
 // Get options
 $shortopts = 'sn';
@@ -25,12 +27,14 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
        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)) {
@@ -43,7 +47,7 @@ $spawn = array_key_exists('s', $options) || array_key_exists('spawn', $options);
 
 if ($spawn) {
        Worker::spawnWorker();
-       killme();
+       exit();
 }
 
 $run_cron = !array_key_exists('n', $options) && !array_key_exists('no_cron', $options);