X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FUpdateServerPeers.php;h=98ae88a97b5be8acded06a0dc1a0f040ecfc4a10;hb=036b565a7846916f763ce1dcbcaade0844ff1589;hp=ff0cdfa730d7446cb8dc491908a8b033ee6e137f;hpb=c6b45a958e3b09bc8f3950a718c181dfc9e0b910;p=friendica.git diff --git a/src/Worker/UpdateServerPeers.php b/src/Worker/UpdateServerPeers.php index ff0cdfa730..98ae88a97b 100644 --- a/src/Worker/UpdateServerPeers.php +++ b/src/Worker/UpdateServerPeers.php @@ -1,6 +1,6 @@ get($url . '/api/v1/instance/peers'); + $ret = DI::httpClient()->get($url . '/api/v1/instance/peers', HttpClientAccept::JSON); if (!$ret->isSuccess() || empty($ret->getBody())) { Logger::info('Server is not reachable or does not offer the "peers" endpoint', ['url' => $url]); return; @@ -58,7 +59,7 @@ class UpdateServerPeers continue; } // This endpoint doesn't offer the schema. So we assume that it is HTTPS. - Worker::add(PRIORITY_LOW, 'UpdateGServer', 'https://' . $peer); + GServer::add('https://' . $peer); ++$added; } Logger::info('Server peer update ended', ['total' => $total, 'added' => $added, 'url' => $url]);