mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-16 00:19:50 -05:00
Add subscription API debugging
Investigating elevated sub end counts in production over time from the subscriptions API.
This commit is contained in:
parent
27b2b53943
commit
340713e721
1 changed files with 7 additions and 0 deletions
|
@ -169,6 +169,13 @@ class SubscriptionHandler extends Handler
|
|||
processInvoices null, (err) =>
|
||||
return @sendDatabaseError(res, err) if err
|
||||
@invoices = newInvoices.concat(@invoices)
|
||||
|
||||
# TODO: Temporarily debugging elevated sub end counts in production over time
|
||||
debugInvoiceCount = @invoices.length
|
||||
@invoices = _.uniq @invoices, false, 'invoiceID'
|
||||
if debugInvoiceCount isnt @invoices.length
|
||||
log.debug "Analytics cached @invoices hadd duplicates: #{debugInvoiceCount} #{@invoices.length}"
|
||||
|
||||
subMap = {}
|
||||
for invoice in @invoices
|
||||
subID = invoice.subscriptionID
|
||||
|
|
Loading…
Reference in a new issue