]> git.mxchange.org Git - friendica.git/commitdiff
"UpdateSuggestions" added
authorMichael <heluecht@pirati.ca>
Fri, 20 Dec 2019 20:49:09 +0000 (20:49 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 20 Dec 2019 20:49:09 +0000 (20:49 +0000)
src/Worker/Cron.php
src/Worker/DiscoverPoCo.php
src/Worker/UpdateSuggestions.php [new file with mode: 0644]

index e43fde28efdf6ccf6453e2922e869c79b567e401..42a62197627802ac3e61d035b41dd68e06efaf8d 100644 (file)
@@ -75,7 +75,7 @@ class Cron
 
                        Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server");
 
-                       Worker::add(PRIORITY_LOW, "DiscoverPoCo", "suggestions");
+                       Worker::add(PRIORITY_LOW, 'UpdateSuggestions');
 
                        Worker::add(PRIORITY_LOW, 'Expire');
 
index 47071e20cb2174354b879c3eaf91d8dff16ea6c9..44b2219201e1e4989f17fcb7b18c7c417715a907 100644 (file)
@@ -27,7 +27,6 @@ class DiscoverPoCo
                /*
                This function can be called in these ways:
                - checkcontact: Updates gcontact entries
-               - suggestions: Discover other servers for their contacts.
                - server <poco url>: Searches for the poco server list. "poco url" is base64 encoded.
                - update_server: Frequently check the first 250 servers for vitality.
                - PortableContact::load: Load POCO data from a given POCO address
@@ -37,8 +36,6 @@ class DiscoverPoCo
                $mode = 0;
                if (($command == "checkcontact") && Config::get('system', 'poco_completion')) {
                        self::discoverUsers();
-               } elseif ($command == "suggestions") {
-                       GContact::updateSuggestions();
                } elseif ($command == "server") {
                        $server_url = $param1;
                        if ($server_url == "") {
diff --git a/src/Worker/UpdateSuggestions.php b/src/Worker/UpdateSuggestions.php
new file mode 100644 (file)
index 0000000..222244c
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+/**
+ * @file src/Worker/UpdateSuggestions.php
+ */
+namespace Friendica\Worker;
+
+use Friendica\Core\Logger;
+use Friendica\Model\GContact;
+
+class UpdateSuggestions
+{
+       // Discover other servers for their contacts.
+       public static function execute()
+       {
+               GContact::updateSuggestions();
+       }
+}