-
Notifications
You must be signed in to change notification settings - Fork 308
run Gratipay 135 #3045
Comments
Droplet spun up and updated. |
47 (37) accounts reviewed. |
Backup taken and verified. |
Script started. |
Looks like we're picking up an old card hold or something? |
I have about 30 minutes before I have to leave to pick up @clone1018 @seanlinsley. |
So what's the URL we tried to hit and why? And why is it 404? |
So |
|
All of these holds are from last week, and are all >>> list(set([h.created_at[:10] for h in holds]))
['2014-12-25']
>>> list(set([h.status for h in holds]))
['failed']
>>> |
Some were updated this week. Presumably those before which ever one was 404. >>> list(set([h.updated_at[:10] for h in holds]))
['2015-01-01', '2014-12-25']
>>> |
At this point I'm in a rush. I say we hotpatch to return silently if canceling a hold 404s. |
>>> updated = [h.updated_at[:10] for h in holds]
>>> updated.count('2015-01-01')
2
>>> updated.count('2014-12-25')
566
>>> |
Sent my brother and dad to pick up @clone1018 and @seanlinsley. |
So I'm in a bit less of a rush. :-) |
The problem is that these holds are marked as
|
Hypothesis: this is a regression introduced in #3011. |
@Changaco Hypothesis is that the Balanced API changed subtly here? |
Upstream issue: balanced/balanced-api#461. |
Do we perhaps clobber |
Ah, I see: |
@Changaco So it seems that we should look for |
I'm gonna try that. |
@whit537 I think we should look for either one. |
Rerunning with this patch: diff --git a/gratipay/billing/payday.py b/gratipay/billing/payday.py
index 9095491..197f32f 100644
--- a/gratipay/billing/payday.py
+++ b/gratipay/billing/payday.py
@@ -390,7 +390,7 @@ class Payday(object):
holds = {}
for hold in CardHold.query.filter(CardHold.f.meta.state == 'new'):
state = 'new'
- if hold.failure_reason:
+ if hold.status == 'failed':
state = 'failed'
elif hold.voided_at:
state = 'cancelled' |
Though I'm still not satisfied as to why we're seeing this now: balanced/balanced-api#461 is from a year ago. |
Why do we have 568 holds left over from last week? Is that normal behavior? Do we have a leak of some kind? |
Rerunning ... |
|
This time it's in the other |
How the heck are we given a hold from |
@whit537 I suggest rerunning with --- a/gratipay/billing/payday.py
+++ b/gratipay/billing/payday.py
@@ -424,7 +424,7 @@ class Payday(object):
# Fetch existing holds
participant_ids = set(p.id for p in participants)
- holds = self.fetch_card_holds(participant_ids)
+ holds = {}
# Create new holds and check amounts of existing ones
def f(p): |
Restarted with ... diff --git a/gratipay/billing/payday.py b/gratipay/billing/payday.py
index 9095491..307d128 100644
--- a/gratipay/billing/payday.py
+++ b/gratipay/billing/payday.py
@@ -423,8 +423,8 @@ class Payday(object):
return {}
# Fetch existing holds
- participant_ids = set(p.id for p in participants)
- holds = self.fetch_card_holds(participant_ids)
+ #participant_ids = set(p.id for p in participants)
+ holds = {} # self.fetch_card_holds(participant_ids)
# Create new holds and check amounts of existing ones
def f(p): |
Script ran for 11 minutes (0:11:06.399468). |
Logs downloaded and uploaded. Droplet destroyed. |
MassPay done and posted back for 76 users. |
Escrow shuffled. |
134
The text was updated successfully, but these errors were encountered: