Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/310665
Change subject: Remove all traces of stomp pending queue ...................................................................... Remove all traces of stomp pending queue DEPLOYMENT NOTE: Redis queue is now just called 'pending' Bug: T131274 Change-Id: If20b52465bc8f27e4458361a2ce93e63ae8efd9e --- M Core/Jobs/DeletePendingJob.php M Maintenance/ConsumePendingQueue.php M SmashPig.yaml 3 files changed, 6 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig refs/changes/65/310665/1 diff --git a/Core/Jobs/DeletePendingJob.php b/Core/Jobs/DeletePendingJob.php index 6a10e67..8a55b8d 100644 --- a/Core/Jobs/DeletePendingJob.php +++ b/Core/Jobs/DeletePendingJob.php @@ -4,7 +4,7 @@ use SmashPig\Core\Logging\Logger; /** - * Job that deletes donor information from the pending data stores. + * Job that deletes donor information from the pending database. * Used when we get a notification of payment failure. */ class DeletePendingJob extends RunnableJob { @@ -38,14 +38,10 @@ "and order ID='{$this->order_id}'" ); $db = PendingDatabase::get(); - if ( $db ) { - $dbMessage = $db->fetchMessageByGatewayOrderId( - $this->gateway, $this->order_id - ); - if ( $dbMessage ) { - $db->deleteMessage( $dbMessage ); - } - } + $db->deleteMessage( array( + 'gateway' => $this->gateway, + 'order_id' => $this->order_id, + ) ); return true; } } diff --git a/Maintenance/ConsumePendingQueue.php b/Maintenance/ConsumePendingQueue.php index 92acc5a..197e319 100644 --- a/Maintenance/ConsumePendingQueue.php +++ b/Maintenance/ConsumePendingQueue.php @@ -21,7 +21,7 @@ public function __construct() { parent::__construct(); - $this->addOption( 'queue', 'queue name to consume from', 'pending-new' ); + $this->addOption( 'queue', 'queue name to consume from', 'pending' ); $this->addOption( 'time-limit', 'Try to keep execution under <n> seconds', 60, 't' ); $this->addOption( 'max-messages', 'At most consume <n> messages', 0, 'm' ); } diff --git a/SmashPig.yaml b/SmashPig.yaml index ca0a795..b8a4070 100644 --- a/SmashPig.yaml +++ b/SmashPig.yaml @@ -37,11 +37,6 @@ queue: payments-antifraud pending: - class: SmashPig\Core\DataStores\StompDataStore - constructor-parameters: - - pending - - pending-new: class: PHPQueue\Backend\Predis constructor-parameters: - @@ -145,8 +140,6 @@ limbo: /queue/limbo verified: /queue/donations failed: /queue/failed - pending: /queue/pending - pending-damaged: /queue/pending-damaged recurring: /queue/donations_recurring refund: /queue/refund jobs: /queue/job-requests -- To view, visit https://gerrit.wikimedia.org/r/310665 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If20b52465bc8f27e4458361a2ce93e63ae8efd9e Gerrit-PatchSet: 1 Gerrit-Project: wikimedia/fundraising/SmashPig Gerrit-Branch: master Gerrit-Owner: Ejegg <eeggles...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits