Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php |
— | — | @@ -59,7 +59,19 @@ |
60 | 60 | $this->handled_ids = array(); |
61 | 61 | |
62 | 62 | //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 | + } |
64 | 76 | $this->adapter->log( 'Removed ' . $this->removed_message_count . ' messages and antimessages.' ); |
65 | 77 | |
66 | 78 | if ( $this->keepGoing() ){ |
— | — | @@ -101,7 +113,7 @@ |
102 | 114 | } |
103 | 115 | } |
104 | 116 | $final = "\nDone! Final results: \n"; |
105 | | - $final .= " $am destroyed via antimessage \n"; |
| 117 | + $final .= " $am destroyed via antimessage (called $am_called_count times) \n"; |
106 | 118 | $final .= " $rec rectified orphans \n"; |
107 | 119 | $final .= " $err errored out \n"; |
108 | 120 | if ( isset( $this->adapter->orphanstats ) ){ |
— | — | @@ -166,6 +178,7 @@ |
167 | 179 | } |
168 | 180 | $this->addStompCorrelationIDToAckBucket( false, true ); //this just acks everything that's waiting for it. |
169 | 181 | $this->adapter->log("Found $count antimessages."); |
| 182 | + return $count; |
170 | 183 | } |
171 | 184 | |
172 | 185 | /** |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
173 | 186 | Merged /trunk/extensions/DonationInterface/globalcollect_gateway/scripts/orphans.php:r107590 |