[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Revert "Mirror messages to new queues in GC audit"

2016-09-17 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "Mirror messages to new queues in GC audit"
..


Revert "Mirror messages to new queues in GC audit"

This reverts commit 9b5e8db36b9afe9bb804d5c873c86bb955622273.

Change-Id: I8ef25e89c94c2923ad90cb8831d484236c675e5a
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
2 files changed, 7 insertions(+), 23 deletions(-)

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



diff --git 
a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
index f7e55c3..a2e6947 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
@@ -7,9 +7,6 @@
  * @TODO print some useful info to STDOUT
  */
 
-use SmashPig\Core\Context;
-use SmashPig\Core\Configuration;
-
 /**
  * Implementation of hook_drush_command()
  */
@@ -72,9 +69,6 @@
  * TODO: More comments here-ish. 
  */
 function drush_globalcollect_audit() {
-   $config = Configuration::createForView( 'globalcollect' );
-   Context::initWithLogger( $config, 'globalcollect_audit' );
-
//$args = drush_get_arguments();

//if the last execution died before we got back here
diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index 3e25a94..7e28d98 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1,6 +1,4 @@
- array( 'contribution_tracking', 'optout' ),
'anonymous' => array( 'contribution_tracking', 'anonymous' ),
'comment' => array( 'contribution_tracking', 'note' ), //I 
think.
+   'size',
+   'premium_language',
'utm_source' => array( 'contribution_tracking', 'utm_source' ),
'utm_medium' => array( 'contribution_tracking', 'utm_medium' ),
'utm_campaign' => array( 'contribution_tracking', 
'utm_campaign' ),
@@ -667,7 +667,6 @@
'country' => array( 'donor_data', 'COUNTRYCODE' ),
'postal_code' => array( 'donor_data', 'ZIP' ),
'gateway_txn_id' => array( 'donor_data', 'ORDERID' ),
-   'order_id' => array( 'donor_data', 'ORDERID' ), //fixme: should 
be merchant reference
'response', //? Maybe some dummy value for "found it in the 
audit phase"
'currency' => array( 'donor_data', 'CURRENCYCODE' ),
'date' => array( 'contribution_tracking', 'ts' ), 
//double-check how the dates work
@@ -1047,7 +1046,7 @@
'type' => wr1_get_negative_type( $wr1 ), 
//refund or chargeback
);
echo print_r( $send_message, true );
-   globalcollect_audit_send_queue_message( 'refund', 
$send_message );
+   globalcollect_audit_send_stomp( 'refund', $send_message 
);
$count += 1;
globalcollect_audit_echo( '.' );
unset( $missing[$index] ); //only unset if we killed it
@@ -2008,7 +2007,7 @@
}
 }
 
-function globalcollect_audit_send_queue_message( $queueId, $body ) {
+function globalcollect_audit_send_stomp( $queueId, $body ) {
 static $q;
 
 if ( !$q ) {
@@ -2018,24 +2017,15 @@
 // FIXME: register the queue mapping somewhere sane
 if ( $queueId === 'donations' ) {
 $queuePath = variable_get( 'queue2civicrm_subscription', 
'/queue/donations' );
-   $configKey = 'data-store/verified-new';
 } elseif ( $queueId === 'refund' ) {
 $queuePath = variable_get( 'refund_queue', '/queue/refund' );
-   $configKey = 'data-store/refund-new';
 } else {
 throw new Exception( "What kind of a queue is this??: {$queueId}" );
 }
 
 $headers = array();
 wmf_common_set_message_source( $headers, 'audit', 'GlobalCollect WR1 
Auditor' );
-   wmf_common_set_message_source( $body, 'audit', 'GlobalCollect WR1 
Auditor' );
 
-   try {
-   $newQueue = Configuration::getDefaultConfig()->object( 
$configKey, true );
-   $newQueue->push( $body );
-   } catch ( ConfigurationKeyException $ex ) {
-   // do nothing
-   }
 return $q->enqueue( json_encode( $body ), $headers, $queuePath );
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ef25e89c94c2923ad90cb8831d484236c675e5a
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Revert "Mirror messages to new queues in GC audit"

2016-09-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Revert "Mirror messages to new queues in GC audit"
..

Revert "Mirror messages to new queues in GC audit"

This reverts commit 9b5e8db36b9afe9bb804d5c873c86bb955622273.

Change-Id: I8ef25e89c94c2923ad90cb8831d484236c675e5a
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
2 files changed, 7 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/19/311319/1

diff --git 
a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
index f7e55c3..a2e6947 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.drush.inc
@@ -7,9 +7,6 @@
  * @TODO print some useful info to STDOUT
  */
 
-use SmashPig\Core\Context;
-use SmashPig\Core\Configuration;
-
 /**
  * Implementation of hook_drush_command()
  */
@@ -72,9 +69,6 @@
  * TODO: More comments here-ish. 
  */
 function drush_globalcollect_audit() {
-   $config = Configuration::createForView( 'globalcollect' );
-   Context::initWithLogger( $config, 'globalcollect_audit' );
-
//$args = drush_get_arguments();

//if the last execution died before we got back here
diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index 3e25a94..7e28d98 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -1,6 +1,4 @@
- array( 'contribution_tracking', 'optout' ),
'anonymous' => array( 'contribution_tracking', 'anonymous' ),
'comment' => array( 'contribution_tracking', 'note' ), //I 
think.
+   'size',
+   'premium_language',
'utm_source' => array( 'contribution_tracking', 'utm_source' ),
'utm_medium' => array( 'contribution_tracking', 'utm_medium' ),
'utm_campaign' => array( 'contribution_tracking', 
'utm_campaign' ),
@@ -667,7 +667,6 @@
'country' => array( 'donor_data', 'COUNTRYCODE' ),
'postal_code' => array( 'donor_data', 'ZIP' ),
'gateway_txn_id' => array( 'donor_data', 'ORDERID' ),
-   'order_id' => array( 'donor_data', 'ORDERID' ), //fixme: should 
be merchant reference
'response', //? Maybe some dummy value for "found it in the 
audit phase"
'currency' => array( 'donor_data', 'CURRENCYCODE' ),
'date' => array( 'contribution_tracking', 'ts' ), 
//double-check how the dates work
@@ -1047,7 +1046,7 @@
'type' => wr1_get_negative_type( $wr1 ), 
//refund or chargeback
);
echo print_r( $send_message, true );
-   globalcollect_audit_send_queue_message( 'refund', 
$send_message );
+   globalcollect_audit_send_stomp( 'refund', $send_message 
);
$count += 1;
globalcollect_audit_echo( '.' );
unset( $missing[$index] ); //only unset if we killed it
@@ -2008,7 +2007,7 @@
}
 }
 
-function globalcollect_audit_send_queue_message( $queueId, $body ) {
+function globalcollect_audit_send_stomp( $queueId, $body ) {
 static $q;
 
 if ( !$q ) {
@@ -2018,24 +2017,15 @@
 // FIXME: register the queue mapping somewhere sane
 if ( $queueId === 'donations' ) {
 $queuePath = variable_get( 'queue2civicrm_subscription', 
'/queue/donations' );
-   $configKey = 'data-store/verified-new';
 } elseif ( $queueId === 'refund' ) {
 $queuePath = variable_get( 'refund_queue', '/queue/refund' );
-   $configKey = 'data-store/refund-new';
 } else {
 throw new Exception( "What kind of a queue is this??: {$queueId}" );
 }
 
 $headers = array();
 wmf_common_set_message_source( $headers, 'audit', 'GlobalCollect WR1 
Auditor' );
-   wmf_common_set_message_source( $body, 'audit', 'GlobalCollect WR1 
Auditor' );
 
-   try {
-   $newQueue = Configuration::getDefaultConfig()->object( 
$configKey, true );
-   $newQueue->push( $body );
-   } catch ( ConfigurationKeyException $ex ) {
-   // do nothing
-   }
 return $q->enqueue( json_encode( $body ), $headers, $queuePath );
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ef25e89c94c2923ad90cb8831d484236c675e5a