]> git.mxchange.org Git - friendica.git/blobdiff - bin/worker.php
Merge pull request #6767 from MrPetovan/bug/fatal-errors
[friendica.git] / bin / worker.php
index 78b7a58a05cfcf24d72187197b319ec69bc3f3c4..c7174d81e1813ea0e246e2435c0132a7bdb8249a 100755 (executable)
@@ -4,10 +4,12 @@
  * @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\Core\Worker;
+use Friendica\Factory;
 
 // Get options
 $shortopts = 'sn';
@@ -28,10 +30,10 @@ if (!file_exists("boot.php") && (sizeof($_SERVER["argv"]) != 0)) {
 
 require dirname(__DIR__) . '/vendor/autoload.php';
 
-$a = new App(dirname(__DIR__));
+$a = Factory\DependencyFactory::setUp('worker', dirname(__DIR__));
 
 // Check the database structure and possibly fixes it
-Update::check(true);
+Update::check($a->getBasePath(), true);
 
 // Quit when in maintenance
 if (!$a->getMode()->has(App\Mode::MAINTENANCEDISABLED)) {