]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/Cron.php
Fix Mastodon InstanceV2 structure needs image max size under mediaAttachment
[friendica.git] / src / Worker / Cron.php
index 055a9b4354ed66556ac450bee8e19c4b391e58c4..a232834bcd27c66e0e32c69e8c6b62392f1ed3f6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -85,8 +85,6 @@ class Cron
 
                // Hourly cron calls
                if ((DI::keyValue()->get('last_cron_hourly') ?? 0) + 3600 < time()) {
-
-
                        // Update trending tags cache for the community page
                        Tag::setLocalTrendingHashtags(24, 20);
                        Tag::setGlobalTrendingHashtags(24, 20);
@@ -141,10 +139,13 @@ class Cron
                                Worker::add(Worker::PRIORITY_LOW, 'CheckRelMeProfileLink', $user['uid']);
                        }
                        DBA::close($users);
-       
+
                        // Resubscribe to relay servers
                        Relay::reSubscribe();
 
+                       // Update "blocked" status of servers
+                       Worker::add(Worker::PRIORITY_LOW, 'UpdateBlockedServers');
+
                        DI::keyValue()->set('last_cron_daily', time());
                }
 
@@ -161,7 +162,7 @@ class Cron
        private static function deleteSleepingProcesses()
        {
                Logger::info('Looking for sleeping processes');
-               
+
                $processes = DBA::p("SHOW FULL PROCESSLIST");
                while ($process = DBA::fetch($processes)) {
                        if (($process['Command'] != 'Sleep') || ($process['Time'] < 300) || ($process['db'] != DBA::databaseName())) {