]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/RemoveUnusedAvatars.php
Issue 11932: Restore SQL performance
[friendica.git] / src / Worker / RemoveUnusedAvatars.php
index da9ca7b04e48298b937d9f9708a4a239e38bc107..4591fb22bf5b7174a376b02b3d7487bd011f3be1 100644 (file)
@@ -39,7 +39,7 @@ class RemoveUnusedAvatars
                                AND NOT `nurl` IN (SELECT `nurl` FROM `contact` WHERE `uid` != ?)
                                AND NOT `contact`.`id` IN (SELECT `author-id` FROM `post-user`)
                                AND NOT `contact`.`id` IN (SELECT `owner-id` FROM `post-user`)
-                               AND NOT `contact`.`id` IN (SELECT `causer-id` FROM `post-user`)
+                               AND NOT `contact`.`id` IN (SELECT `causer-id` FROM `post-user` WHERE `causer-id` IS NOT NULL)
                                AND NOT `contact`.`id` IN (SELECT `cid` FROM `post-tag`)
                                AND NOT `contact`.`id` IN (SELECT `contact-id` FROM `post-user`);";
 
@@ -56,7 +56,7 @@ class RemoveUnusedAvatars
                                        Logger::notice('We are outside of the maintenance window, quitting');
                                        return;
                                }
-                               Logger::notice('In removal', ['count' => $count, 'total' => $total]);
+                               Logger::info('In removal', ['count' => $count, 'total' => $total]);
                        }
                }
                DBA::close($contacts);