Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

rewrite payday #3414

Merged
merged 14 commits into from
May 14, 2015
Merged

rewrite payday #3414

merged 14 commits into from
May 14, 2015

Conversation

chadwhitacre
Copy link
Contributor

Part of #3399.

@chadwhitacre chadwhitacre added this to the Pivot milestone May 13, 2015
@chadwhitacre chadwhitacre mentioned this pull request May 13, 2015
@chadwhitacre
Copy link
Contributor Author

I've printed out payday.py and started combing through it. The reason why #3399 (comment) doesn't result in escrow or complicated graph settling is that it ... doesn't do complicated graph settling: b can't feed their $1 back into the system. I think we should run with that, so that we can move towards #1383 with this.

@chadwhitacre
Copy link
Contributor Author

I'm hoping we can also pick off #3378 while we're here, another part of #1383.

@chadwhitacre
Copy link
Contributor Author

I believe since we're not cycling the graph multiple times per payday, we don't need to use the is_funded mechanism for distributing funds. We should just be able to use card_hold_ok directly.

@chadwhitacre
Copy link
Contributor Author

Basically, the work here is to implement the prototype I wrote in Python, in the SQL inside prepare_db. Most of the Python shell around payday should be able to stay intact.

This was referenced May 13, 2015
@chadwhitacre
Copy link
Contributor Author

I'm starting with the test_transfer_tips{_whole_graph} tests, because that calls settle_tip_graph(), which is the heart of payday.

@chadwhitacre
Copy link
Contributor Author

There is some interaction between participants.balance and payday_participants.card_hold_ok that I need to understand. It relates to #1383 and how we're going to approach that here.

@chadwhitacre
Copy link
Contributor Author

On the one hand it seems like we should avoid tackling the arrears issue (#3378) on this PR. On the other hand ...

@chadwhitacre
Copy link
Contributor Author

Okay! I believe with that last commit we've gotten rid of the feedback. 🎤 😵 screeeeeeeeeeeeee

Now to introduce teams ...

@chadwhitacre
Copy link
Contributor Author

P.S. We still make payments from preexisting balances, which means we can avoid tackling #3378 here. Phew.

rohitpaulk and others added 3 commits May 14, 2015 13:26
To go with subscriptions
This is a temporary table for keeping track of teams during payday.
@chadwhitacre
Copy link
Contributor Author

Wow. Caching is a 🐰-hole. I'm going to stub it out for now. We'll migrate caching of receiving, etc., later.

The test suite uses this extensively. I want to modify payday tests so I
really need this.
@chadwhitacre
Copy link
Contributor Author

I'm also going to not worry about the payroll side this week. Gratipay is the only one of the half-dozen or so teams we're aiming to run with today that uses payroll. We'll just let the full amount clear to our bank account this week. Sorry, Gratipay team. :-/

Next up is implementing process_draws (for owners), then, probalby later
on, process_takes.
@chadwhitacre
Copy link
Contributor Author

I believe that's it for this PR.

@chadwhitacre chadwhitacre mentioned this pull request May 14, 2015
@chadwhitacre
Copy link
Contributor Author

Alright, Travis is green. ✅

Here we go! Nothing ventured, nothing gained!

chadwhitacre added a commit that referenced this pull request May 14, 2015
@chadwhitacre chadwhitacre merged commit 9a2767b into master May 14, 2015
@chadwhitacre chadwhitacre deleted the new-payday branch May 14, 2015 21:04
@rohitpaulk
Copy link
Contributor

👯

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants