Check and add a server

This commit is contained in:
Michael 2020-12-03 22:32:51 +00:00
parent 8cbe2f025b
commit 8d999f54d0
5 changed files with 63 additions and 84 deletions

View file

@ -22,9 +22,9 @@
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\GServer;
use Friendica\Util\Strings;
class UpdateServerPeers
@ -58,7 +58,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]);