r107591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107590‎ | r107591 | r107592 >
Date:19:41, 29 December 2011
Author:khorn
Status:deferred
Tags:
Comment:
MFT 107590
Modified paths:
  • /branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php (modified) (history)

Diff [purge]

Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
@@ -59,7 +59,19 @@
6060 $this->handled_ids = array();
6161
6262 //first, we need to... clean up the limbo queue.
63 - $this->handleStompAntiMessages();
 63+
 64+ //building in some redundancy here.
 65+ $keepGoing = true;
 66+ $am_called_count = 0;
 67+ while ( $keepGoing ){
 68+ $antimessageCount = $this->handleStompAntiMessages();
 69+ $am_called_count += 1;
 70+ if ( $antimessageCount === 0 ){
 71+ $keepGoing = false;
 72+ } else {
 73+ sleep(2); //two seconds.
 74+ }
 75+ }
6476 $this->adapter->log( 'Removed ' . $this->removed_message_count . ' messages and antimessages.' );
6577
6678 if ( $this->keepGoing() ){
@@ -101,7 +113,7 @@
102114 }
103115 }
104116 $final = "\nDone! Final results: \n";
105 - $final .= " $am destroyed via antimessage \n";
 117+ $final .= " $am destroyed via antimessage (called $am_called_count times) \n";
106118 $final .= " $rec rectified orphans \n";
107119 $final .= " $err errored out \n";
108120 if ( isset( $this->adapter->orphanstats ) ){
@@ -166,6 +178,7 @@
167179 }
168180 $this->addStompCorrelationIDToAckBucket( false, true ); //this just acks everything that's waiting for it.
169181 $this->adapter->log("Found $count antimessages.");
 182+ return $count;
170183 }
171184
172185 /**
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php
___________________________________________________________________
Modified: svn:mergeinfo
173186 Merged /trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php:r107590

Status & tagging log