-
Notifications
You must be signed in to change notification settings - Fork 308
Conversation
I just ran the test suite for this branch. |
Hit an error:
|
IRC re: integration testing. Decided to do it manually. |
else: | ||
# The amount is too low, cancel the hold and make a new one | ||
cancel_card_hold(holds.pop(p.id)) | ||
hold, error = create_card_hold(self.db, p, amount) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create_card_hold
and ach_credit
use two different error models. They raise exceptions, and they also return an error
value. Here we're only handling the second of these strategies, with the result that an exception raised by create_card_hold
will terminate payday, whereas it should result in a log message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like in payout
, which calls ach_credit
, both error models are handled. We have a try except block in there around ach_credit
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it should terminate payday, create_card_hold
is not supposed to raise an exception here, if it does then something is wrong, like the fact that I forgot to add AND is_suspicious IS false
in the query above.
Should we change the few remaining uses of |
Looks like we're running afoul of the
|
By commenting out the maxconn restriction I was able to run a payday locally! 💃
|
I don't think we really need the maxconn restriction so I've removed it. |
@Changaco I'm pretty sure that |
Docs for |
#1600 has backstory on |
I'm trying to see what the current setting for |
We can, but we'll lose the
We can add one of course, I simply forgot. |
http://www.postgresql.org/docs/9.3/static/view-pg-settings.html |
Not seeing Reticketed as #2601. |
Did we lose those message on the payin side? |
I'm not sure. |
On second thought it's trivial to keep the log message, I've added a commit that removes the try/except block but keeps the log message. |
Awesome, good call! |
I simulated a payday crash and ended up with a balance conflict when rerunning. Sorry, I don't have more detailed information about where in the payday cycle the crash hit.
|
Why name the temporary tables |
I'm not sure why, but I can rename them if you want. |
Hmm, can you dump the DB so that I can inspect the participants and exchanges? |
@whit537 I believe I've found the problem, I've added commits to fix it and prevent future problems from going undetected like this one. |
@Changaco I think we should write a script to populate a Balanced marketplace with users and credit cards and bank accounts according to |
No, I forgot to answer that. I'm not sure it's a good idea to stop withholding money for the following week. I think we should keep the current behavior for now.
Yes. |
Hmm ... this was one of the driving concerns on #1486. What's the reason not to make that change here? |
The withholding mechanism is only responsible for $573.75 of our current escrow.
|
Okay, fair enough. I guess if I'm honest, I was personally hoping to get that $150 I've got stuck in Gittip right now, but that's a bad basis for this decision. :-) |
Okay! I think we might be close, @Changaco! 💃 What's left to do here? |
Total runtime: 52570.561 ms → 118.837 ms
Optimize DB check
!m @Changaco |
Step 6 of #2508. Follow-on from #2541.