}
Logger::log('Update directory from server ' . $gserver['url'] . ' with ID ' . $gserver['id'], Logger::DEBUG);
- Worker::add(PRIORITY_LOW, 'DiscoverPoCo', 'update_server_directory', (int) $gserver['id']);
+ Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', (int)$gserver['id']);
if (!$complete && ( --$no_of_queries == 0)) {
break;
- 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.
- - update_server_directory: Discover the given server id for their contacts
- PortableContact::load: Load POCO data from a given POCO address
*/
Logger::log($result, Logger::DEBUG);
} elseif ($command == "update_server") {
self::updateServer();
- } elseif ($command == "update_server_directory") {
- PortableContact::discoverSingleServer(intval($param1));
} elseif ($command == "load") {
if (!empty($param4)) {
$url = $param4;
--- /dev/null
+<?php
+/**
+ * @file src/Worker/UpdateServerDirectory.php
+ */
+namespace Friendica\Worker;
+
+use Friendica\Core\Logger;
+use Friendica\Protocol\PortableContact;
+
+class UpdateServerDirectory.php
+{
+ // Discover the given server id for their contacts
+ public static function execute($gserverid)
+ {
+ PortableContact::discoverSingleServer(gserverid);
+ return;
+ }
+}