From: Alexander Ebert Date: Wed, 9 May 2018 10:46:34 +0000 (+0200) Subject: Commit changes to the user storage at worker end X-Git-Tag: 3.1.3~40 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=398390d062cbfb7ff0b533fe570e57aff7644c90;p=GitHub%2FWoltLab%2FWCF.git 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. --- 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(); } }