Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/291008

Change subject: Exclude bots from edit stash stats
......................................................................

Exclude bots from edit stash stats

Change-Id: Id309879eaaf039de7ac5f531930fa8e758a959c7
---
M includes/api/ApiStashEdit.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/291008/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/291008
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: master
Gerrit-Owner: Aaron Schulz <[email protected]>

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

Reply via email to