News "blocked" field on the gserver table
This commit is contained in:
@@ -27,6 +27,7 @@ use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\GServer;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||
use Friendica\Util\Network;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
class UpdateServerPeers
|
||||
@@ -56,6 +57,11 @@ class UpdateServerPeers
|
||||
$total = 0;
|
||||
$added = 0;
|
||||
foreach ($peers as $peer) {
|
||||
if (Network::isUrlBlocked('http://' . $peer)) {
|
||||
// Ignore blocked systems as soon as possible in the loop to avoid being slowed down by tar pits
|
||||
continue;
|
||||
}
|
||||
|
||||
++$total;
|
||||
if (DBA::exists('gserver', ['nurl' => Strings::normaliseLink('http://' . $peer)])) {
|
||||
// We already know this server
|
||||
|
||||
Reference in New Issue
Block a user