Awight has uploaded a new change for review.

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

Change subject: Don't delete the message until we're done with it
......................................................................

Don't delete the message until we're done with it

Also removes a bogus transformation, we don't need to unnormalize messages
any more, normalization is safe to run on already normalized data.

Bug: T107852
Change-Id: I927b7c77bdd9a25be9986feab92e89d2ffe42527
---
M globalcollect_gateway/scripts/orphans.php
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/41/231441/1

diff --git a/globalcollect_gateway/scripts/orphans.php 
b/globalcollect_gateway/scripts/orphans.php
index e6f9d46..baa4913 100644
--- a/globalcollect_gateway/scripts/orphans.php
+++ b/globalcollect_gateway/scripts/orphans.php
@@ -75,6 +75,9 @@
                                        } else {
                                                
$this->handled_ids[$correlation_id] = 'error';
                                        }
+
+                                       // Throw out the message either way.
+                                       $this->deleteMessage( $correlation_id, 
$current_queue );
                                }
                        }
                } while ( count( $orphans ) && $this->keepGoing() );
@@ -173,14 +176,8 @@
                                }
 
                                // We got ourselves an orphan!
-                               $order_id = explode('-', $correlation_id);
-                               $order_id = $order_id[1];
-                               $message['order_id'] = $order_id;
-                               $message = unCreateQueueMessage($message);
                                $orphans[$correlation_id] = $message;
                                $this->logger->info( "Found an orphan! 
$correlation_id" );
-
-                               $this->deleteMessage( $correlation_id, 
$current_queue );
 
                                // Round-robin the pool before we complete the 
loop.
                                $queue_pool->rotate();
@@ -228,6 +225,7 @@
                                $rectified = true;
                        }
                }
+
                echo $message . "\n";
                
                return $rectified;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I927b7c77bdd9a25be9986feab92e89d2ffe42527
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to