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

Change subject: Avoid DBReadOnlyError in MessageGroupStats
......................................................................


Avoid DBReadOnlyError in MessageGroupStats

This is the simplest fix. JobQueue can be considered if the
write queries must be avoided on GET requests.

Bug: T129969
Change-Id: Ia313229d2701fb83437a944fdeddc688f187dc37
---
M utils/MessageGroupStats.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/utils/MessageGroupStats.php b/utils/MessageGroupStats.php
index 79bbde0..92cf2e5 100644
--- a/utils/MessageGroupStats.php
+++ b/utils/MessageGroupStats.php
@@ -453,6 +453,10 @@
        }
 
        protected static function queueUpdates() {
+               if ( wfReadOnly() ) {
+                       return;
+               }
+
                if ( !count( self::$updates ) ) {
                        return;
                }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia313229d2701fb83437a944fdeddc688f187dc37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to