X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FUpdateGServers.php;h=108482eaecef4035336e8b1c7797c3f8ddacde29;hb=0e82f64d71b598a1349ac22973148715f7182fdd;hp=486dbc93c225ecfe96d9c96571c7549ba39a85c6;hpb=f9994548c1f1110c7f548e00fcf1b6ee42b9de3b;p=friendica.git diff --git a/src/Worker/UpdateGServers.php b/src/Worker/UpdateGServers.php index 486dbc93c2..108482eaec 100644 --- a/src/Worker/UpdateGServers.php +++ b/src/Worker/UpdateGServers.php @@ -1,6 +1,6 @@ $total, 'outdated' => $outdated, 'updating' => $limit]); @@ -62,12 +63,16 @@ class UpdateGServers // There are duplicated "url" but not "nurl". So we check both addresses instead of just overwriting them, // since that would mean loosing data. if (!empty($gserver['url'])) { - Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url']); + if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) { + $count++; + } } if (!empty($gserver['nurl']) && ($gserver['nurl'] != Strings::normaliseLink($gserver['url']))) { - Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['nurl']); + if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) { + $count++; + } } - $count++; + Worker::coolDown(); } DBA::close($gservers); Logger::info('Updated servers', ['count' => $count]);