Mattflaschen has uploaded a new change for review.
https://gerrit.wikimedia.org/r/311653
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(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/53/311653/1
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: newchange
Gerrit-Change-Id: Ied72608c9b3aa597627aa5ea069c257f506c3c1b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits