Ejegg has uploaded a new change for review.

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

Change subject: Revert "Mirror queue messages from wmf_audit"
......................................................................

Revert "Mirror queue messages from wmf_audit"

This reverts commit db7469fb24050402ee4b3599fb75aa3b26038b68.

Change-Id: I9d78dc305b64a02b1a79bc2f4380bb795765fa51
---
M sites/all/modules/wmf_audit/wmf_audit.module
1 file changed, 3 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/20/311320/1

diff --git a/sites/all/modules/wmf_audit/wmf_audit.module 
b/sites/all/modules/wmf_audit/wmf_audit.module
index 4891b4c..79f409c 100644
--- a/sites/all/modules/wmf_audit/wmf_audit.module
+++ b/sites/all/modules/wmf_audit/wmf_audit.module
@@ -1,7 +1,6 @@
 <?php
 
 use SmashPig\Core\Configuration;
-use SmashPig\Core\ConfigurationKeyException;
 use SmashPig\Core\Context;
 
 define('WMF_AUDIT_PAYMENTS_LOGS_DIR', '/usr/local/src/logs/');
@@ -388,11 +387,11 @@
     return true;
   }
 
-  return wmf_audit_send_queue_message($record, $type);
+  return wmf_audit_send_stomp($record, $type);
 }
 
 /**
- * Send the message in $body to appropriate message queues.
+ * Send the message in $body to an appropriate stomp message queue.
  * @staticvar array $types Types of transaction we know about, that probably 
all
  * have different queues.
  * @param array $body An array representing the transaction we're trying to
@@ -402,7 +401,7 @@
  * Standard for the stomp libraries, but still lame.
  * @throws Exception
  */
-function wmf_audit_send_queue_message( $body, $type ) {
+function wmf_audit_send_stomp($body, $type) {
   static $types = array();
 
   $q = queue2civicrm_stomp();
@@ -434,20 +433,6 @@
   }
 
   wmf_common_set_message_source($headers, 'audit', 
wmf_audit_runtime_options('submod_prefix') . ' Recon Auditor');
-  wmf_common_set_message_source($body, 'audit', 
wmf_audit_runtime_options('submod_prefix') . ' Recon Auditor');
 
-  $configKeys = array(
-    'main' => 'data-store/verified-new',
-    'negative' => 'data-store/refund-new',
-    'recurring' => 'data-store/recurring-new',
-  );
-  try{
-    $newQueue = Configuration::getDefaultConfig()->object(
-      $configKeys[$type]
-    );
-    $newQueue->push( $body );
-  } catch ( ConfigurationKeyException $ex ) {
-    // do nothing
-  }
   return $q->enqueue(json_encode($body), $headers, $types[$type]);
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d78dc305b64a02b1a79bc2f4380bb795765fa51
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

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

Reply via email to