Add bootstrap script
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 22 Nov 2022 13:16:49 +0000 (14:16 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 22 Nov 2022 13:16:49 +0000 (14:16 +0100)
see 32f697980b0c763a822419aff5eedce3f0a48e53

files/lib/bootstrap/com.woltlab.wcf.conversation.php [new file with mode: 0644]

diff --git a/files/lib/bootstrap/com.woltlab.wcf.conversation.php b/files/lib/bootstrap/com.woltlab.wcf.conversation.php
new file mode 100644 (file)
index 0000000..95d9bba
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+use wcf\system\event\EventHandler;
+use wcf\system\worker\event\RebuildWorkerCollecting;
+
+return static function (): void {
+    $eventHandler = EventHandler::getInstance();
+
+    $eventHandler->register(RebuildWorkerCollecting::class, static function (RebuildWorkerCollecting $event) {
+        $event->register(\wcf\system\worker\ConversationMessageRebuildDataWorker::class, -5);
+        $event->register(\wcf\system\worker\ConversationRebuildDataWorker::class, 0);
+        $event->register(\wcf\system\worker\ConversationMessageSearchIndexRebuildDataWorker::class, 300);
+    });
+};