Awight has uploaded a new change for review. https://gerrit.wikimedia.org/r/220710
Change subject: Remove unsupported "direct" mode ...................................................................... Remove unsupported "direct" mode If we decide to want this, we'll just replace the queue send function. Change-Id: Ib2f9454b4e219381cb9bd2853458051129eda4f8 --- M sites/all/modules/wmf_audit/wmf_audit.module M sites/all/modules/wmf_audit/worldpay/worldpay_audit.drush.inc 2 files changed, 3 insertions(+), 21 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm refs/changes/10/220710/1 diff --git a/sites/all/modules/wmf_audit/wmf_audit.module b/sites/all/modules/wmf_audit/wmf_audit.module index 5ab67c1..adff527 100644 --- a/sites/all/modules/wmf_audit/wmf_audit.module +++ b/sites/all/modules/wmf_audit/wmf_audit.module @@ -1,7 +1,6 @@ <?php define('WMF_AUDIT_PAYMENTS_LOGS_DIR', '/usr/local/src/logs/'); -define('WMF_AUDIT_DIRECT_INSERT', false); /** * Implementation of hook_menu() @@ -53,12 +52,6 @@ '#title' => t('Path to directory containing WMF payments logs'), '#required' => TRUE, '#default_value' => variable_get('wmf_audit_log_archive_dir', WMF_AUDIT_PAYMENTS_LOGS_DIR), - ); - $form['wmf_audit_direct_insert'] = array( - '#type' => 'checkbox', - '#title' => t('When this box is checked, the audit scripts will attempt to write to civicrm directly, instead of flooding the regular queues'), - '#required' => FALSE, - '#default_value' => variable_get('wmf_audit_direct_insert', WMF_AUDIT_DIRECT_INSERT), ); return system_settings_form($form); } @@ -1204,9 +1197,8 @@ /** * Sends a completed transaction to... somewhere. * The default is to send this thing to an appropriate stomp queue for its type. - * Other possibilities are to echo the complete message (test mode) or try to - * save the message to civicm directly (no_queue, not currently supported. - * It's nice to want things.) + * Other possibilities are to echo the complete message (test mode). + * * @param array $record An array representing the complete data we want to save * @param string $type The type of transaction we are. 'main', 'negative', * 'recurring'... like that. @@ -1218,14 +1210,7 @@ return true; } - if (wmf_audit_runtime_options('no_queue')) { - die(__FUNCTION__ . " Direct inserts are not yet supported. Please use queue flood mode." . print_r($record, true)); - // wmf_civicrm_contribution_message_import($record); //or something like that - //BLOCKERS: No failmail or standard hooks yet. - //Other things: Do we need a different import function for each main type? I mean, we have three different queue consumers. - } else { - return wmf_audit_send_stomp($record, $type); - } + return wmf_audit_send_stomp($record, $type); } /** diff --git a/sites/all/modules/wmf_audit/worldpay/worldpay_audit.drush.inc b/sites/all/modules/wmf_audit/worldpay/worldpay_audit.drush.inc index 308f61e..08e9097 100644 --- a/sites/all/modules/wmf_audit/worldpay/worldpay_audit.drush.inc +++ b/sites/all/modules/wmf_audit/worldpay/worldpay_audit.drush.inc @@ -24,7 +24,6 @@ 'makemissing' => 'Will reconstruct the un-rebuildable transactions found in the recon file, with default values. USE WITH CAUTION: Currently this prevents real data from entering the system if we ever get it.', 'charlimit' => 'Will cause echoing to line break after the given number of characters', 'verbose' => 'Verbose output', - 'no_queue' => 'Running in direct insert mode - no queue flooding', 'recon_complete_count' => 'Number past which we should consider a recon file to be "complete", and move it out of the working dir.', ), 'aliases' => array('wp_audit'), @@ -54,7 +53,6 @@ 'makemissing' => 'Making payments data for missing transactions', 'run_all' => 'Running all recon files! This might take a while...', 'verbose' => 'Outputting verbose.', - 'no_queue' => 'Running in direct insert mode', 'recon_complete_count' => 'Number past which we should consider a recon file to be "complete", and move it out of the working dir.' ); @@ -62,7 +60,6 @@ //handle our defaults first... $args['test'] = variable_get('worldpay_audit_test_mode', WP_AUDIT_TEST_MODE); - $args['no_queue'] = variable_get('wmf_audit_direct_insert', WMF_AUDIT_DIRECT_INSERT); //defaults to false at the UI level. Can't really set *to* false at the command line, though... //now override with the command line settings foreach ($simple_opts as $key => $message) { if (drush_get_option($key)) { -- To view, visit https://gerrit.wikimedia.org/r/220710 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2f9454b4e219381cb9bd2853458051129eda4f8 Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/crm Gerrit-Branch: master Gerrit-Owner: Awight <awi...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits