]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Cron.php
Issue 11932: Restore SQL performance
[friendica.git] / src / Worker / Cron.php
index ee3fafe4bbea4c83db5dacf87dc120731a013f4f..12ea6e60a36c8fffd9217301f74b0124b5d9f2db 100644 (file)
@@ -89,7 +89,10 @@ class Cron
                        Tag::setLocalTrendingHashtags(24, 20);
                        Tag::setGlobalTrendingHashtags(24, 20);
 
-                       // Process pending posts in the queue
+                       // Remove old pending posts from the queue
+                       Queue::clear();
+
+                       // Process all unprocessed entries
                        Queue::processAll();
 
                        // Search for new contacts in the directory
@@ -112,7 +115,7 @@ class Cron
 
                        Worker::add(PRIORITY_LOW, 'ExpirePosts');
 
-                       Worker::add(PRIORITY_LOW, 'ExpireConversations');
+                       Worker::add(PRIORITY_LOW, 'ExpireActivities');
 
                        Worker::add(PRIORITY_LOW, 'RemoveUnusedTags');
 
@@ -128,11 +131,11 @@ class Cron
                        if (DI::config()->get('system', 'optimize_tables')) {
                                Worker::add(PRIORITY_LOW, 'OptimizeTables');
                        }
-       
-                       DI::config()->set('system', 'last_cron_daily', time());
 
                        // Resubscribe to relay servers
                        Relay::reSubscribe();
+
+                       DI::config()->set('system', 'last_cron_daily', time());
                }
 
                Logger::notice('end');