]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/UpdateContacts.php
Only attach images
[friendica.git] / src / Worker / UpdateContacts.php
index e6469fe19e0a1ae8dca8fbd254334abb7c6ce556..7e352a27caf9f683bee524c8205cf8cf3993a5f4 100644 (file)
@@ -55,13 +55,14 @@ class UpdateContacts
                        $condition = array_merge(['local-data' => true], $condition);
                }
 
-               $condition = array_merge(["`next-update` < ?", DateTimeFormat::utcNow()], $condition);
+               $condition = DBA::mergeConditions(["`next-update` < ?", DateTimeFormat::utcNow()], $condition);
                $contacts = DBA::select('contact', ['id'], $condition, ['order' => ['next-update'], 'limit' => $limit]);
                $count = 0;
                while ($contact = DBA::fetch($contacts)) {
                        if (Worker::add(['priority' => PRIORITY_LOW, 'dont_fork' => true], "UpdateContact", $contact['id'])) {
                                ++$count;
                        }
+                       Worker::coolDown();
                }
                DBA::close($contacts);