Worker::add(PRIORITY_LOW, "DiscoverPoCo", "update_server");
- Worker::add(PRIORITY_LOW, "DiscoverPoCo", "suggestions");
+ Worker::add(PRIORITY_LOW, 'UpdateSuggestions');
Worker::add(PRIORITY_LOW, 'Expire');
/*
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
$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 == "") {
--- /dev/null
+<?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();
+ }
+}