You are browsing a read-only backup copy of Wikitech. The primary site can be found at

Fundraising/Queue wrangling

From Wikitech-static
< Fundraising
Revision as of 22:54, 20 May 2016 by imported>Ejegg
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

When a lot of adyen or amazon messages show up in the damaged queue with MISSING_PREDECESSOR, it's usually because they can't find matching pending queue messages. Here's how to recreate those from logs:

It was possible, but a bit tedious. Need to script out much of this:

php Maintenance/EmptyQueueToDump.php --no-ack --queue donations-damaged --outfile ~/damagedDonations.json -m 100 --config-file ~/SmashPigConfig.php  --raw
grep -o 'completion_message_id."[^"]*"[^"]\+' ~/damagedDonations.json | sed -e 's/.*astropay-/astropay-/' -e 's/.$//' > ~/missingPendingMessages

(move missingPendingMessage to log box)

zgrep -F -f ~/missingPendingMessages payments-astropay-20160[45]* > ~/missingAstroPayLogJson

then, using this raw message template as apcontainer:


create a file that we can shove into the pending queue:

for corrid in `cat missingPendingMessages`
body=`grep $corrid missingAstroPayLogJson | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'`
echo `sed -e "s/CORRID/$corrid/" apcontainer`$escbody\"\} >> syntheticMessages.json

(move syntheticMessages to smashpig box)

php Maintenance/PopulateQueueFromDump.php --config-file config.php --queue pending ~/syntheticMessages.json