X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FCron.php;h=d450f4cd5b19a478e5f41cfc673ffc7d17e61368;hb=45ee7d55f0dd3026f17602b2afb9a59d08d354d6;hp=210abfcecf6b747a08a24d1eafbc3ddfda6ed05a;hpb=38a5358bfa646ae13a4a1a385741890fa88d9b7f;p=friendica.git diff --git a/src/Worker/Cron.php b/src/Worker/Cron.php index 210abfcecf..d450f4cd5b 100644 --- a/src/Worker/Cron.php +++ b/src/Worker/Cron.php @@ -1,6 +1,6 @@ get('system', 'last_cron_hourly', 0) + 3600 < time()) { + // Update trending tags cache for the community page Tag::setLocalTrendingHashtags(24, 20); Tag::setGlobalTrendingHashtags(24, 20); + // Remove old pending posts from the queue + Queue::clear(); + + // Process all unprocessed entries + Queue::processAll(); + // Search for new contacts in the directory if (DI::config()->get('system', 'synchronize_directory')) { - Worker::add(PRIORITY_LOW, 'PullDirectory'); + Worker::add(Worker::PRIORITY_LOW, 'PullDirectory'); } - // Delete all done workerqueue entries - Worker::add(PRIORITY_LOW, 'CleanWorkerQueue'); - // Clear cache entries - Worker::add(PRIORITY_LOW, 'ClearCache'); + Worker::add(Worker::PRIORITY_LOW, 'ClearCache'); DI::config()->set('system', 'last_cron_hourly', time()); } @@ -104,27 +111,38 @@ class Cron // Daily maintenance cron calls if (Worker::isInMaintenanceWindow(true)) { - Worker::add(PRIORITY_LOW, 'UpdateContactBirthdays'); + Worker::add(Worker::PRIORITY_LOW, 'UpdateContactBirthdays'); + + Worker::add(Worker::PRIORITY_LOW, 'UpdatePhotoAlbums'); - Worker::add(PRIORITY_LOW, 'UpdatePhotoAlbums'); + Worker::add(Worker::PRIORITY_LOW, 'ExpirePosts'); - Worker::add(PRIORITY_LOW, 'ExpirePosts'); + Worker::add(Worker::PRIORITY_LOW, 'ExpireActivities'); - Worker::add(PRIORITY_LOW, 'ExpireConversations'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedTags'); - Worker::add(PRIORITY_LOW, 'RemoveUnusedContacts'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedContacts'); - Worker::add(PRIORITY_LOW, 'RemoveUnusedAvatars'); + Worker::add(Worker::PRIORITY_LOW, 'RemoveUnusedAvatars'); // check upstream version? - Worker::add(PRIORITY_LOW, 'CheckVersion'); + Worker::add(Worker::PRIORITY_LOW, 'CheckVersion'); - Worker::add(PRIORITY_LOW, 'CheckDeletedContacts'); + Worker::add(Worker::PRIORITY_LOW, 'CheckDeletedContacts'); + + Worker::add(Worker::PRIORITY_LOW, 'UpdateAllSuggestions'); if (DI::config()->get('system', 'optimize_tables')) { - Worker::add(PRIORITY_LOW, 'OptimizeTables'); + Worker::add(Worker::PRIORITY_LOW, 'OptimizeTables'); + } + + foreach (User::getList(1, PHP_INT_MAX, 'active') as $user) { + Worker::add(Worker::PRIORITY_LOW, 'CheckRelMeProfileLink', $user['uid']); } - + + // Resubscribe to relay servers + Relay::reSubscribe(); + DI::config()->set('system', 'last_cron_daily', time()); }