]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Cron.php
Don't add contacts when not needed
[friendica.git] / src / Worker / Cron.php
index 011fa4629104bd8930e90864ccb5fd011cf79389..f0c85f66866a2c8af569c96907a1df78eb9e318c 100644 (file)
@@ -4,7 +4,6 @@
  */
 namespace Friendica\Worker;
 
-use Friendica\BaseObject;
 use Friendica\Core\Addon;
 use Friendica\Core\Config;
 use Friendica\Core\Hook;
@@ -12,6 +11,7 @@ use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Util\DateTimeFormat;
 
@@ -19,7 +19,7 @@ class Cron
 {
        public static function execute()
        {
-               $a = BaseObject::getApp();
+               $a = DI::app();
 
                $last = Config::get('system', 'last_cron');
 
@@ -38,11 +38,11 @@ class Cron
                // Fork the cron jobs in separate parts to avoid problems when one of them is crashing
                Hook::fork($a->queue['priority'], "cron");
 
-               // run the process to discover global contacts in the background
-               Worker::add(PRIORITY_LOW, "DiscoverPoCo");
+               // run the process to update server directories in the background
+               Worker::add(PRIORITY_LOW, 'UpdateServerDirectories');
 
                // run the process to update locally stored global contacts in the background
-               Worker::add(PRIORITY_LOW, 'DiscoverContacts');
+               Worker::add(PRIORITY_LOW, 'UpdateGContacts');
 
                // Expire and remove user entries
                Worker::add(PRIORITY_MEDIUM, "CronJobs", "expire_and_remove_users");
@@ -73,7 +73,7 @@ class Cron
                        // update nodeinfo data
                        Worker::add(PRIORITY_LOW, "CronJobs", "nodeinfo");
 
-                       Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server");
+                       Worker::add(PRIORITY_LOW, 'UpdateGServers');
 
                        Worker::add(PRIORITY_LOW, 'UpdateSuggestions');