jenkins-bot has submitted this change and it was merged.

Change subject: Fix moderation controller
......................................................................


Fix moderation controller

The change to use DeferredUpdates had a missing use.

Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b
---
M includes/controller/ModerationController.php
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/controller/ModerationController.php 
b/includes/controller/ModerationController.php
index 0c45357..27241b4 100644
--- a/includes/controller/ModerationController.php
+++ b/includes/controller/ModerationController.php
@@ -24,12 +24,12 @@
                $affectedUserIds = 
$notificationMapper->fetchUsersWithNotificationsForEvents( $eventIds );
                $eventMapper->toggleDeleted( $eventIds, $moderate );
 
-               DeferredUpdates::addCallableUpdate( function () {
-                       // This udate runs after than main transaction round 
commits.
-                       // Wait for the events deletions to be propagated to 
replica DBs
+               DeferredUpdates::addCallableUpdate( function () use ( 
$affectedUserIds ) {
+                       // This update runs after the main transaction round 
commits.
+                       // Wait for the event deletions to be propagated to 
replica DBs
                        $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                        $lbFactory->waitForReplication( [ 'timeout' => 5 ] );
-                       $lbFactory->flushReplicaSnapshots( __METHOD__ );
+                       $lbFactory->flushReplicaSnapshots( 
'EchoModerationController::moderate' );
                        // Recompute the notification count for the
                        // users whose notifications have been moderated.
                        foreach ( $affectedUserIds as $userId ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/311653
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <mflasc...@wikimedia.org>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Catrope <roan.katt...@gmail.com>
Gerrit-Reviewer: Sbisson <sbis...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to