Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/275727
Change subject: Reset scoped session for two more jobs after deferred updates
......................................................................
Reset scoped session for two more jobs after deferred updates
Follows up 21eaefa8be0c5e8f
Bug: T126450
Change-Id: I0ee0894014471f7960a17d2322a80903bf2f6277
---
M includes/CreateLocalAccountJob.php
M includes/LocalRenameJob/LocalPageMoveJob.php
2 files changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth
refs/changes/27/275727/1
diff --git a/includes/CreateLocalAccountJob.php
b/includes/CreateLocalAccountJob.php
index 021eeeb..846446b 100644
--- a/includes/CreateLocalAccountJob.php
+++ b/includes/CreateLocalAccountJob.php
@@ -31,6 +31,9 @@
$this->params['session']['userId'] = 0;
$this->params['session']['sessionId'] = '';
$callback = RequestContext::importScopedSession(
$this->params['session'] );
+ $this->addTeardownCallback( function() use ( &$callback
) {
+ ScopedCallback::consume( $callback );
+ } );
}
$user = User::newFromName( $username );
diff --git a/includes/LocalRenameJob/LocalPageMoveJob.php
b/includes/LocalRenameJob/LocalPageMoveJob.php
index d7e6239..3af8d53 100644
--- a/includes/LocalRenameJob/LocalPageMoveJob.php
+++ b/includes/LocalRenameJob/LocalPageMoveJob.php
@@ -34,6 +34,9 @@
public function run() {
if ( isset( $this->params['session'] ) ) {
$callback = RequestContext::importScopedSession(
$this->params['session'] );
+ $this->addTeardownCallback( function() use ( &$callback
) {
+ ScopedCallback::consume( $callback );
+ } );
}
$this->user = User::newFromName( $this->params['renamer'] );
if ( isset( $this->params['pages'] ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/275727
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ee0894014471f7960a17d2322a80903bf2f6277
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits