mirror of
https://github.com/friendica/friendica
synced 2025-04-29 09:04:24 +02:00
Discovery of peers of other servers
This commit is contained in:
parent
ca2267a4a6
commit
bb70258d48
2 changed files with 75 additions and 4 deletions
|
@ -1591,9 +1591,9 @@ class GServer
|
|||
$gservers = DBA::p("SELECT `id`, `url`, `nurl`, `network`, `poco`
|
||||
FROM `gserver`
|
||||
WHERE NOT `failed`
|
||||
AND `poco` != ''
|
||||
AND `directory-type` != ?
|
||||
AND `last_poco_query` < ?
|
||||
ORDER BY RAND()", $last_update
|
||||
ORDER BY RAND()", self::DT_NONE, $last_update
|
||||
);
|
||||
|
||||
while ($gserver = DBA::fetch($gservers)) {
|
||||
|
@ -1604,8 +1604,13 @@ class GServer
|
|||
continue;
|
||||
}
|
||||
|
||||
Logger::info('Update directory', ['server' => $gserver['url'], 'id' => $gserver['id']]);
|
||||
Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', $gserver);
|
||||
Logger::info('Update peer list', ['server' => $gserver['url'], 'id' => $gserver['id']]);
|
||||
Worker::add(PRIORITY_LOW, 'UpdateServerPeers', $gserver['url']);
|
||||
|
||||
if ($gserver['directory-type'] == self::DT_POCO) {
|
||||
Logger::info('Update directory', ['server' => $gserver['url'], 'id' => $gserver['id']]);
|
||||
Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', $gserver);
|
||||
}
|
||||
|
||||
if (--$no_of_queries == 0) {
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue