From 398390d062cbfb7ff0b533fe570e57aff7644c90 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Wed, 9 May 2018 12:46:34 +0200 Subject: [PATCH] Commit changes to the user storage at worker end The `finalize()` method is invoked for every iteration on CLI and somewhat simulates the behavior of dedicated requests. Despite its name, `shutdown()` does not disable the user storage handler, it will simply save the changes and reset the internal storages in preparation for the next iteration. --- .../files/lib/system/worker/AbstractRebuildDataWorker.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wcfsetup/install/files/lib/system/worker/AbstractRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/AbstractRebuildDataWorker.class.php index 29ddfcce5c..c1de85d0b6 100644 --- a/wcfsetup/install/files/lib/system/worker/AbstractRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/AbstractRebuildDataWorker.class.php @@ -9,6 +9,7 @@ use wcf\system\exception\ParentClassException; use wcf\system\exception\SystemException; use wcf\system\request\LinkHandler; use wcf\system\search\SearchIndexManager; +use wcf\system\user\storage\UserStorageHandler; use wcf\system\WCF; /** @@ -175,5 +176,6 @@ abstract class AbstractRebuildDataWorker extends AbstractWorker implements IRebu */ public function finalize() { SearchIndexManager::getInstance()->commitBulkOperation(); + UserStorageHandler::getInstance()->shutdown(); } } -- 2.20.1