]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateGServers.php
change the cURL success check and adopt the logger messages
[friendica.git] / src / Worker / UpdateGServers.php
index 7581065d9141cdb3d1e424b2d87da8b8730e5a51..25a2db16e0f8ac22b5bc95f98f698a4558c7c6b9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -63,15 +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'])) {
-                               if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) {
+                               if (Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $gserver['url'])) {
                                        $count++;
                                }
                        }
                        if (!empty($gserver['nurl']) && ($gserver['nurl'] != Strings::normaliseLink($gserver['url']))) {
-                               if (Worker::add(PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) {
+                               if (Worker::add(Worker::PRIORITY_LOW, 'UpdateGServer', $gserver['nurl'])) {
                                        $count++;
                                }
                        }
+                       Worker::coolDown();
                }
                DBA::close($gservers);
                Logger::info('Updated servers', ['count' => $count]);