]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/PollContacts.php
Issue 12302: Remote self is working again
[friendica.git] / src / Worker / PollContacts.php
index 313a8c6812b9472425dd38c943011f889f7d62ea..454b5a9aea46c80335825b4bf39543eb8d7fe808 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
  *
@@ -71,16 +71,17 @@ class PollContacts
                        }
 
                        if ((($contact['network'] == Protocol::FEED) && ($contact['priority'] <= 3)) || ($contact['network'] == Protocol::MAIL)) {
-                               $priority = PRIORITY_MEDIUM;
+                               $priority = Worker::PRIORITY_MEDIUM;
                        } elseif ($contact['archive']) {
-                               $priority = PRIORITY_NEGLIGIBLE;
+                               $priority = Worker::PRIORITY_NEGLIGIBLE;
                        } else {
-                               $priority = PRIORITY_LOW;
+                               $priority = Worker::PRIORITY_LOW;
                        }
 
                        Logger::notice("Polling " . $contact["network"] . " " . $contact["id"] . " " . $contact['priority'] . " " . $contact["nick"] . " " . $contact["name"]);
 
                        Worker::add(['priority' => $priority, 'dont_fork' => true, 'force_priority' => true], 'OnePoll', (int)$contact['id']);
+                       Worker::coolDown();
                }
                DBA::close($contacts);
        }