]> git.mxchange.org Git - friendica.git/blobdiff - bin/worker.php
Merge pull request #6520 from Aditoo17/develop
[friendica.git] / bin / worker.php
index 78b6da5857343598d81ce0825196d40fc4004b44..a64b6a83305660f705bf5530141061ddcf379269 100755 (executable)
@@ -8,6 +8,7 @@ use Friendica\App;
 use Friendica\Core\Config;
 use Friendica\Core\Worker;
 use Friendica\Core\Update;
+use Friendica\Util\LoggerFactory;
 
 // Get options
 $shortopts = 'sn';
@@ -28,7 +29,9 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
 
 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
 Update::check(true);
@@ -44,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);