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);
- }
+ Logger::info('Update directory', ['server' => $gserver['url'], 'id' => $gserver['id']]);
+ Worker::add(PRIORITY_LOW, 'UpdateServerDirectory', $gserver);
+ $fields = ['last_poco_query' => DateTimeFormat::utcNow()];
+ DBA::update('gserver', $fields, ['nurl' => $gserver['nurl']]);
+
if (--$no_of_queries == 0) {
break;
}
}
}
- $fields = ['last_poco_query' => DateTimeFormat::utcNow()];
- DBA::update('gserver', $fields, ['nurl' => $server["nurl"]]);
-
return true;
} else {
// If the server hadn't replied correctly, then force a sanity check
GServer::check($server["url"], $server["network"], true);
- // If we couldn't reach the server, we will try it some time later
- $fields = ['last_poco_query' => DateTimeFormat::utcNow()];
- DBA::update('gserver', $fields, ['nurl' => $server["nurl"]]);
-
return false;
}
}