Relocated functions

This commit is contained in:
Michael 2019-12-21 06:39:22 +00:00
parent 4024d725db
commit fab85255b6
5 changed files with 78 additions and 55 deletions

View file

@ -5,14 +5,13 @@
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Protocol\PortableContact;
use Friendica\Model\GServer;
class UpdateServerDirectory
{
// Discover the given server id for their contacts
public static function execute($gserverid)
public static function execute($gserver)
{
PortableContact::discoverSingleServer($gserverid);
GServer::updateDirectory($gserver);
return;
}
}

View file

@ -7,7 +7,7 @@ namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\Core\Worker;
use Friendica\Database\DBA;
use Friendica\Protocol\PortableContact;
use Friendica\Model\GServer;
class UpdateServers
{
@ -25,7 +25,7 @@ class UpdateServers
$updated = 0;
while ($gserver = DBA::fetch($gservers)) {
if (!PortableContact::updateNeeded($gserver['created'], '', $gserver['last_failure'], $gserver['last_contact'])) {
if (!GServer::updateNeeded($gserver['created'], '', $gserver['last_failure'], $gserver['last_contact'])) {
continue;
}
Logger::info('Update server status', ['server' => $gserver['url']]);