if (!Network::isUrlBlocked($contact)) {
Logger::info('Discover new AP contact', ['url' => $contact]);
- Worker::add(PRIORITY_LOW, 'UpdateGContact', $contact);
+ Worker::add(PRIORITY_LOW, 'UpdateGContact', $contact, 'nodiscover');
} else {
Logger::info('No discovery, the URL is blocked.', ['url' => $contact]);
}
}
if (!Network::isUrlBlocked($entry['value'])) {
Logger::info('Discover new PoCo contact', ['url' => $entry['value']]);
- Worker::add(PRIORITY_LOW, 'UpdateGContact', $entry['value']);
+ Worker::add(PRIORITY_LOW, 'UpdateGContact', $entry['value'], 'nodiscover');
} else {
Logger::info('No discovery, the URL is blocked.', ['url' => $entry['value']]);
}
public static function execute(string $url, string $command = '')
{
$force = ($command == "force");
+ $nodiscover = ($command == "nodiscover");
$success = GContact::updateFromProbe($url, $force);
Logger::info('Updated from probe', ['url' => $url, 'force' => $force, 'success' => $success]);
- if ($success && (DI::config()->get('system', 'gcontact_discovery') == GContact::DISCOVERY_RECURSIVE)) {
+ if ($success && !$nodiscover && (DI::config()->get('system', 'gcontact_discovery') == GContact::DISCOVERY_RECURSIVE)) {
GContact::discoverFollowers($url);
}
}