Awight has uploaded a new change for review.

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

Change subject: Don't do contribution tracking in batch mode
......................................................................

Don't do contribution tracking in batch mode

Change-Id: Iccc4ea482e226201f2c173399524600dd39cf3f8
---
M gateway_common/gateway.adapter.php
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/17/166917/1

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index ee73bff..814d210 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1042,8 +1042,10 @@
                                return $this->getTransactionAllResults();
                        }
 
-                       //TODO: Maybe move this to the pre_process functions?
-                       $this->dataObj->saveContributionTrackingData();
+                       if ( !$this->isBatchProcessor() ) {
+                               //TODO: Maybe move this to the pre_process 
functions?
+                               $this->dataObj->saveContributionTrackingData();
+                       }
 
                        $commType = $this->getCommunicationType();
                        if ( $commType === 'redirect' ) {
@@ -1675,7 +1677,7 @@
                        return;
                }
 
-               if ( $saveDB === null ){
+               if ( $saveDB === null && !$this->isBatchProcessor() ) {
                        $db = 
ContributionTrackingProcessor::contributionTrackingConnection();
                        if ( $db->tableExists( 'communication_stats' ) ) {
                                $saveDB = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccc4ea482e226201f2c173399524600dd39cf3f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

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

Reply via email to