"CheckServer" is now "UpdateGServer"
This commit is contained in:
parent
598f314577
commit
26ac9a0063
|
@ -270,7 +270,7 @@ class PortableContact
|
||||||
|
|
||||||
if (!DBA::isResult($r)) {
|
if (!DBA::isResult($r)) {
|
||||||
Logger::log("Call server check for server ".$server_url, Logger::DEBUG);
|
Logger::log("Call server check for server ".$server_url, Logger::DEBUG);
|
||||||
Worker::add(PRIORITY_LOW, 'CheckServer', $server_url);
|
Worker::add(PRIORITY_LOW, 'UpdateGServer', $server_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -295,7 +295,7 @@ class PortableContact
|
||||||
|
|
||||||
if (!empty($servers['pods'])) {
|
if (!empty($servers['pods'])) {
|
||||||
foreach ($servers['pods'] as $server) {
|
foreach ($servers['pods'] as $server) {
|
||||||
Worker::add(PRIORITY_LOW, 'CheckServer', 'https://' . $server['host']);
|
Worker::add(PRIORITY_LOW, 'UpdateGServer', 'https://' . $server['host']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ class PortableContact
|
||||||
|
|
||||||
foreach ($servers['instances'] as $server) {
|
foreach ($servers['instances'] as $server) {
|
||||||
$url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name'];
|
$url = (is_null($server['https_score']) ? 'http' : 'https') . '://' . $server['name'];
|
||||||
Worker::add(PRIORITY_LOW, 'CheckServer', $url);
|
Worker::add(PRIORITY_LOW, 'UpdateGServer', $url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* @file src/Worker/CheckServer.php
|
* @file src/Worker/UpdateGServer.php
|
||||||
*/
|
*/
|
||||||
namespace Friendica\Worker;
|
namespace Friendica\Worker;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ use Friendica\Core\Logger;
|
||||||
use Friendica\Model\GServer;
|
use Friendica\Model\GServer;
|
||||||
use Friendica\Util\Strings;
|
use Friendica\Util\Strings;
|
||||||
|
|
||||||
class CheckServer
|
class UpdateGServer
|
||||||
{
|
{
|
||||||
// Searches for the poco server list.
|
// Searches for the poco server list.
|
||||||
public static function execute($server_url)
|
public static function execute($server_url)
|
||||||
|
@ -23,6 +23,6 @@ class CheckServer
|
||||||
}
|
}
|
||||||
|
|
||||||
$ret = GServer::check($server_url);
|
$ret = GServer::check($server_url);
|
||||||
Logger::info('Checked server', ['url' => $server_url, 'result' => $ret]);
|
Logger::info('Updated gserver', ['url' => $server_url, 'result' => $ret]);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,7 +30,7 @@ class UpdateServers
|
||||||
}
|
}
|
||||||
Logger::info('Update server status', ['server' => $gserver['url']]);
|
Logger::info('Update server status', ['server' => $gserver['url']]);
|
||||||
|
|
||||||
Worker::add(PRIORITY_LOW, 'CheckServer', $gserver['url']);
|
Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url']);
|
||||||
|
|
||||||
if (++$updated > 250) {
|
if (++$updated > 250) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user