Aaron Schulz has uploaded a new change for review.
https://gerrit.wikimedia.org/r/291017
Change subject: Exclude bots from edit stash stats
......................................................................
Exclude bots from edit stash stats
Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7
(cherry picked from commit cddfe0d98fed01b65750928fe535ad6db2e39bf1)
---
M includes/api/ApiStashEdit.php
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/17/291017/1
diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index 93003cc..ce254c9 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -259,6 +259,10 @@
* @return stdClass|bool Returns false on cache miss
*/
public static function checkCache( Title $title, Content $content, User
$user ) {
+ if ( $user->isBot() ) {
+ return false; // bots never stash - don't pollute stats
+ }
+
$cache = ObjectCache::getLocalClusterInstance();
$logger = LoggerFactory::getInstance( 'StashEdit' );
$stats = RequestContext::getMain()->getStats();
--
To view, visit https://gerrit.wikimedia.org/r/291017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.3
Gerrit-Owner: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits