From 73df173efc026aa923fa2a7290fcd7dfbf66949c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 18 Nov 2022 17:03:07 +0100 Subject: [PATCH] Migrate the existing rebuild worker registration into the bootstrap script --- com.woltlab.wcf/objectType.xml | 147 ++++++++---------- .../files/lib/bootstrap/com.woltlab.wcf.php | 17 ++ wcfsetup/install/lang/de.xml | 52 +++---- wcfsetup/install/lang/en.xml | 52 +++---- 4 files changed, 136 insertions(+), 132 deletions(-) diff --git a/com.woltlab.wcf/objectType.xml b/com.woltlab.wcf/objectType.xml index 6cb8bab090..18eca79ccf 100644 --- a/com.woltlab.wcf/objectType.xml +++ b/com.woltlab.wcf/objectType.xml @@ -522,86 +522,6 @@ wcf\system\importer\ReactionTypeImporter - - - com.woltlab.wcf.like - com.woltlab.wcf.rebuildData - wcf\system\worker\LikeRebuildDataWorker - -100 - - - com.woltlab.wcf.article - com.woltlab.wcf.rebuildData - wcf\system\worker\ArticleRebuildDataWorker - 50 - - - com.woltlab.wcf.page - com.woltlab.wcf.rebuildData - wcf\system\worker\PageRebuildDataWorker - 50 - - - com.woltlab.wcf.poll - com.woltlab.wcf.rebuildData - wcf\system\worker\PollRebuildDataWorker - 60 - - - com.woltlab.wcf.activityPointEvent - com.woltlab.wcf.rebuildData - wcf\system\worker\UserActivityPointUpdateEventsWorker - 65 - - - com.woltlab.wcf.user - com.woltlab.wcf.rebuildData - wcf\system\worker\UserRebuildDataWorker - 70 - - - com.woltlab.wcf.activityPointItems - com.woltlab.wcf.rebuildData - wcf\system\worker\UserActivityPointItemsRebuildDataWorker - 75 - - - com.woltlab.wcf.attachment - com.woltlab.wcf.rebuildData - wcf\system\worker\AttachmentRebuildDataWorker - 100 - - - com.woltlab.wcf.media - com.woltlab.wcf.rebuildData - wcf\system\worker\MediaRebuildDataWorker - 105 - - - com.woltlab.wcf.statDaily - com.woltlab.wcf.rebuildData - wcf\system\worker\StatDailyRebuildDataWorker - 110 - - - com.woltlab.wcf.comment - com.woltlab.wcf.rebuildData - wcf\system\worker\CommentRebuildDataWorker - 120 - - - com.woltlab.wcf.comment.response - com.woltlab.wcf.rebuildData - wcf\system\worker\CommentResponseRebuildDataWorker - 120 - - - com.woltlab.wcf.sitemap - com.woltlab.wcf.rebuildData - wcf\system\worker\SitemapRebuildWorker - 130 - - com.woltlab.wcf.user @@ -1819,4 +1739,71 @@ + + + com.woltlab.wcf.rebuildData + wcf\system\worker\LikeRebuildDataWorker + -100 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\ArticleRebuildDataWorker + 50 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\PageRebuildDataWorker + 50 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\PollRebuildDataWorker + 60 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\UserActivityPointUpdateEventsWorker + 65 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\UserRebuildDataWorker + 70 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\UserActivityPointItemsRebuildDataWorker + 75 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\AttachmentRebuildDataWorker + 100 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\MediaRebuildDataWorker + 105 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\StatDailyRebuildDataWorker + 110 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\CommentRebuildDataWorker + 120 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\CommentResponseRebuildDataWorker + 120 + + + com.woltlab.wcf.rebuildData + wcf\system\worker\SitemapRebuildWorker + 130 + + diff --git a/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php b/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php index a62b770265..f5cbaf1a7a 100644 --- a/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php +++ b/wcfsetup/install/files/lib/bootstrap/com.woltlab.wcf.php @@ -16,6 +16,7 @@ use wcf\system\package\event\PackageInstallationPluginSynced; use wcf\system\package\event\PackageListChanged; use wcf\system\user\authentication\event\UserLoggedIn; use wcf\system\WCF; +use wcf\system\worker\event\RebuildWorkerCollecting; return static function (): void { $eventHandler = EventHandler::getInstance(); @@ -41,4 +42,20 @@ return static function (): void { $eventHandler->register(PackageInstallationPluginSynced::class, PipSyncedPhrasePreloadListener::class); WCF::getTPL()->assign('phrasePreloader', new PhrasePreloader()); $eventHandler->register(PreloadPhrasesCollecting::class, PreloadPhrasesCollectingListener::class); + + $eventHandler->register(RebuildWorkerCollecting::class, static function (RebuildWorkerCollecting $event) { + $event->register(\wcf\system\worker\LikeRebuildDataWorker::class, -100); + $event->register(\wcf\system\worker\ArticleRebuildDataWorker::class, 50); + $event->register(\wcf\system\worker\PageRebuildDataWorker::class, 50); + $event->register(\wcf\system\worker\PollRebuildDataWorker::class, 60); + $event->register(\wcf\system\worker\UserActivityPointUpdateEventsWorker::class, 65); + $event->register(\wcf\system\worker\UserRebuildDataWorker::class, 70); + $event->register(\wcf\system\worker\UserActivityPointItemsRebuildDataWorker::class, 75); + $event->register(\wcf\system\worker\AttachmentRebuildDataWorker::class, 100); + $event->register(\wcf\system\worker\MediaRebuildDataWorker::class, 105); + $event->register(\wcf\system\worker\StatDailyRebuildDataWorker::class, 110); + $event->register(\wcf\system\worker\CommentRebuildDataWorker::class, 120); + $event->register(\wcf\system\worker\CommentResponseRebuildDataWorker::class, 120); + $event->register(\wcf\system\worker\SitemapRebuildWorker::class, 130); + }); }; diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index ad94fc3f39..e1b14b9aeb 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2635,32 +2635,32 @@ Abschnitte dürfen nicht leer sein und nur folgende Zeichen enthalten: [a-z - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 2827200b13..e4f9a413e9 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2567,32 +2567,32 @@ If you have already bought the licenses for the listed apps, th - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + -- 2.20.1