]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/RemoveUnusedContacts.php
Issue 11932: Restore SQL performance
[friendica.git] / src / Worker / RemoveUnusedContacts.php
index 324ec2419f144584cf2772135b51e042941bc4b3..038376c22c925d199edca8d6d49ec13b905e63fe 100644 (file)
@@ -78,9 +78,9 @@ class RemoveUnusedContacts
                        DBA::delete('post-thread-user', ['author-id' => $contact['id']]);
                        DBA::delete('post-thread-user', ['causer-id' => $contact['id']]);
 
-                       DBA::delete('contact', ['id' => $contact['id']]);
+                       Contact::deleteById($contact['id']);
                        if ((++$count % 1000) == 0) {
-                               Logger::notice('In removal', ['count' => $count, 'total' => $total]);
+                               Logger::info('In removal', ['count' => $count, 'total' => $total]);
                        }
                }
                DBA::close($contacts);