X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FUpdateContacts.php;h=7e352a27caf9f683bee524c8205cf8cf3993a5f4;hb=0e82f64d71b598a1349ac22973148715f7182fdd;hp=e6469fe19e0a1ae8dca8fbd254334abb7c6ce556;hpb=23cf850198a567c24949ba000613fe749910f9bb;p=friendica.git diff --git a/src/Worker/UpdateContacts.php b/src/Worker/UpdateContacts.php index e6469fe19e..7e352a27ca 100644 --- a/src/Worker/UpdateContacts.php +++ b/src/Worker/UpdateContacts.php @@ -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);