Mobrovac has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/378222 )

Change subject: Temporary log all the executions of the update job.
......................................................................

Temporary log all the executions of the update job.

As a part of migration to the EventBus based JobQueue,
we've started to double-process the UpdateBetaFeatureUserCountsJob.
In order to verify correctness and compare 2 queue implementations,
we will temporary log all the executions of the job and then match
the logs between old and new pipelines. The job is extremelly low
volume, ~0.1/s, so we would not flood the logs.

See also: https://gerrit.wikimedia.org/r/#/c/378078
Bug: T175637

Change-Id: I9d0345292a63e5516aae727de7c047117faa5ae0
---
M includes/UpdateBetaFeatureUserCountsJob.php
1 file changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures 
refs/changes/22/378222/1

diff --git a/includes/UpdateBetaFeatureUserCountsJob.php 
b/includes/UpdateBetaFeatureUserCountsJob.php
index f354e08..916d1ca 100644
--- a/includes/UpdateBetaFeatureUserCountsJob.php
+++ b/includes/UpdateBetaFeatureUserCountsJob.php
@@ -23,11 +23,18 @@
  * @license GNU General Public License version 2 or later
  */
 
+use MediaWiki\Logger\LoggerFactory;
+
 class UpdateBetaFeatureUserCountsJob extends Job {
+
+       /** @var \Psr\Log\LoggerInterface */
+       private $logger;
+
        public function __construct( $title, $params ) {
                parent::__construct( 'updateBetaFeaturesUserCounts', $title, 
$params );
 
                $this->removeDuplicates = true;
+               $this->logger = LoggerFactory::getInstance( 
'updateBetaFeaturesUserCounts' );
        }
 
        /**
@@ -36,6 +43,13 @@
         * @return bool
         */
        public function run() {
+               // Temporarily log all the jobs in order to compare old redis 
JobQueue with EventBus
+               // JobQueue pipeline. This event is very low-volume (~0.1 
events per second), so we
+               // will not overload the logs.
+               // Jobs delivered by EventBus will have the 'pipeline' property 
set to EventBus
+               // so that the corresponding jobs can be matched together using 
the requestId.
+               $this->logger->info( 'Executing', $this->params );
+
                $dbw = wfGetDB( DB_MASTER );
 
                $res = $dbw->select(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d0345292a63e5516aae727de7c047117faa5ae0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to