New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run Gratipay 274 #1149

Closed
gratipay-bot opened this Issue Aug 31, 2017 · 69 comments

Comments

Projects
None yet
3 participants
@gratipay-bot

gratipay-bot commented Aug 31, 2017

← Payday 273


Runbook

http://inside.gratipay.com/howto/run-payday

Checklist

  • Review accounts
  • Trigger backup
  • Run payday script
  • Commit payday logs
  • Run masspay
    • DB query to update broken paypal fees
    • Generate paypal inputs
    • Verify there is no fee mismatch
    • Submit masspay on paypal
    • Post back masspay
  • Commit masspay logs
  • Shuffle escrow
  • Review decline rate
Rotation
Month Pilot Copilot
September @whit537 ✈️ @clone1018
October rohitpaulk whit537
November clone1018 rohitpaulk
December whit537 clone1018
January rohitpaulk whit537
February clone1018 rohitpaulk
March whit537 clone1018
April rohitpaulk whit537
May clone1018 rohitpaulk
June whit537 clone1018
July rohitpaulk whit537
August clone1018 rohitpaulk
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Accounts reviewed.

Contributor

chadwhitacre commented Sep 1, 2017

Accounts reviewed.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

/me sets his clock to Honolulu time ... 😁

screen shot 2017-08-31 at 10 12 51 pm

Contributor

chadwhitacre commented Sep 1, 2017

/me sets his clock to Honolulu time ... 😁

screen shot 2017-08-31 at 10 12 51 pm

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Problem taking backup:

pg_dump: error reading large object 21839: SSL SYSCALL error: Operation timed out

It was pretty much done, too. :-/

And now my comment won't post.

whit537.org won't load.

Wireless on my laptop is dead?

It's off but it shows as on in the status bar?

screen shot 2017-08-31 at 10 21 55 pm

Restarting computer.

Now getting "Wi-Fi: No hardware installed". I saw this for the first time a week ago. Re-restart cleared it up, iirc?

screen shot 2017-08-31 at 10 23 30 pm

Contributor

chadwhitacre commented Sep 1, 2017

Problem taking backup:

pg_dump: error reading large object 21839: SSL SYSCALL error: Operation timed out

It was pretty much done, too. :-/

And now my comment won't post.

whit537.org won't load.

Wireless on my laptop is dead?

It's off but it shows as on in the status bar?

screen shot 2017-08-31 at 10 21 55 pm

Restarting computer.

Now getting "Wi-Fi: No hardware installed". I saw this for the first time a week ago. Re-restart cleared it up, iirc?

screen shot 2017-08-31 at 10 23 30 pm

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

😓

Contributor

chadwhitacre commented Sep 1, 2017

😓

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Backup restarted ...

Contributor

chadwhitacre commented Sep 1, 2017

Backup restarted ...

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Backup finished and verified.

Contributor

chadwhitacre commented Sep 1, 2017

Backup finished and verified.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Started script, saw Sept 1 and killed it. UTC! Restarted ...

[gratipay] $ ./payday.sh 274 for_real_please
Run payday #274? (y/N) y
Run payday #274 FOR REAL?!?!?!??!?!? (y/N) y
Logging to ../logs/payday/gratipay-274.log.

Fri Sep  1 08:39:21 UTC 2017
^C
[gratipay] $ ./payday.sh 274 for_real_please
Rerun payday #274? (y/N) y
Rerun payday #274 FOR REAL?!?!?!??!?!? (y/N) y
Contributor

chadwhitacre commented Sep 1, 2017

Started script, saw Sept 1 and killed it. UTC! Restarted ...

[gratipay] $ ./payday.sh 274 for_real_please
Run payday #274? (y/N) y
Run payday #274 FOR REAL?!?!?!??!?!? (y/N) y
Logging to ../logs/payday/gratipay-274.log.

Fri Sep  1 08:39:21 UTC 2017
^C
[gratipay] $ ./payday.sh 274 for_real_please
Rerun payday #274? (y/N) y
Rerun payday #274 FOR REAL?!?!?!??!?!? (y/N) y
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Saw a TypeError, realized I might not be on master, killed it right after "Greetings, program! It's Payday!"

Contributor

chadwhitacre commented Sep 1, 2017

Saw a TypeError, realized I might not be on master, killed it right after "Greetings, program! It's Payday!"

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

But now it looks like the script kept running? 😞

[gratipay] $ tail -n19 ../logs/payday/gratipay-274.log
pid-1658 thread-140737185432512 (MainThread) Captured 39 card holds.
pid-1658 thread-140737185432512 (MainThread) Canceling card holds.
pid-1658 thread-140737185432512 (MainThread) Canceled 0 card holds.
pid-1658 thread-140737185432512 (MainThread) Updating balances.
pid-1658 thread-140737185432512 (MainThread) Updated the balances of 270 participants.
pid-1658 thread-140737185432512 (MainThread) Taking over balances.
pid-1658 thread-140737185432512 (MainThread) Updating stats.
pid-1658 thread-140737185432512 (MainThread) Updated payday stats.
pid-1658 thread-140737185432512 (MainThread) Notifying participants.
pid-1658 thread-140737185432512 (MainThread) Traceback (most recent call last):
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/cli/payday.py", line 11, in main
pid-1658 thread-140737185432512 (MainThread)     Application().payday_runner.run_payday()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/payday_runner.py", line 27, in run_payday
pid-1658 thread-140737185432512 (MainThread)     self._start_payday().run()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/billing/payday.py", line 90, in run
pid-1658 thread-140737185432512 (MainThread)     self.notify_participants()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/billing/payday.py", line 480, in notify_participants
pid-1658 thread-140737185432512 (MainThread)     _user_initiated=False
pid-1658 thread-140737185432512 (MainThread) TypeError: put() takes exactly 5 arguments (3 given)
Contributor

chadwhitacre commented Sep 1, 2017

But now it looks like the script kept running? 😞

[gratipay] $ tail -n19 ../logs/payday/gratipay-274.log
pid-1658 thread-140737185432512 (MainThread) Captured 39 card holds.
pid-1658 thread-140737185432512 (MainThread) Canceling card holds.
pid-1658 thread-140737185432512 (MainThread) Canceled 0 card holds.
pid-1658 thread-140737185432512 (MainThread) Updating balances.
pid-1658 thread-140737185432512 (MainThread) Updated the balances of 270 participants.
pid-1658 thread-140737185432512 (MainThread) Taking over balances.
pid-1658 thread-140737185432512 (MainThread) Updating stats.
pid-1658 thread-140737185432512 (MainThread) Updated payday stats.
pid-1658 thread-140737185432512 (MainThread) Notifying participants.
pid-1658 thread-140737185432512 (MainThread) Traceback (most recent call last):
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/cli/payday.py", line 11, in main
pid-1658 thread-140737185432512 (MainThread)     Application().payday_runner.run_payday()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/payday_runner.py", line 27, in run_payday
pid-1658 thread-140737185432512 (MainThread)     self._start_payday().run()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/billing/payday.py", line 90, in run
pid-1658 thread-140737185432512 (MainThread)     self.notify_participants()
pid-1658 thread-140737185432512 (MainThread)   File "/Users/whit537/personal/gratipay/gratipay.com/gratipay/billing/payday.py", line 480, in notify_participants
pid-1658 thread-140737185432512 (MainThread)     _user_initiated=False
pid-1658 thread-140737185432512 (MainThread) TypeError: put() takes exactly 5 arguments (3 given)
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

I've shelved my work on gratipay/gratipay.com#4548 and am back on master.

Contributor

chadwhitacre commented Sep 1, 2017

I've shelved my work on gratipay/gratipay.com#4548 and am back on master.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

I am reading payday.py to determine if I should re-run w/o any code changes (commenting out).

Contributor

chadwhitacre commented Sep 1, 2017

I am reading payday.py to determine if I should re-run w/o any code changes (commenting out).

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
gratipay::DATABASE=> select * from paydays order by ts_end desc limit 1;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(1 row)

gratipay::DATABASE=>
Contributor

chadwhitacre commented Sep 1, 2017

gratipay::DATABASE=> select * from paydays order by ts_end desc limit 1;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(1 row)

gratipay::DATABASE=>
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Since stage is 2 a re-rerun will skip payin and update_stats. We'll hit end a second time, but that'll be a no-op since there's no payday with ts_end 1970.

Contributor

chadwhitacre commented Sep 1, 2017

Since stage is 2 a re-rerun will skip payin and update_stats. We'll hit end a second time, but that'll be a no-op since there's no payday with ts_end 1970.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Okay, that sucked.

I re-ran ... and it started a new payday! And so I ctrl-c'd right at "It's payday!" ... and then remembered that that wasn't enough to kill the script last time! So I did a ps and kill 1823 as fast as I could ... and I think it was enough?

gratipay::DATABASE=> select * from paydays order by ts_end desc limit 1;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(1 row)

gratipay::DATABASE=>
Contributor

chadwhitacre commented Sep 1, 2017

Okay, that sucked.

I re-ran ... and it started a new payday! And so I ctrl-c'd right at "It's payday!" ... and then remembered that that wasn't enough to kill the script last time! So I did a ps and kill 1823 as fast as I could ... and I think it was enough?

gratipay::DATABASE=> select * from paydays order by ts_end desc limit 1;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(1 row)

gratipay::DATABASE=>
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

There is no log for 275. Why not? 👀

[gratipay] $ less ../logs/payday/gratipay-27
gratipay-270.log  gratipay-274.log  
Contributor

chadwhitacre commented Sep 1, 2017

There is no log for 275. Why not? 👀

[gratipay] $ less ../logs/payday/gratipay-27
gratipay-270.log  gratipay-274.log  
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Because I ran it as 274, so new messages are appended to 274.

[gratipay] $ ./payday.sh 274 for_real_please
Contributor

chadwhitacre commented Sep 1, 2017

Because I ran it as 274, so new messages are appended to 274.

[gratipay] $ ./payday.sh 274 for_real_please
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Thankfully, it appears that I killed the process in the nick of time. I see card holds but no captures. 😓 💦

Contributor

chadwhitacre commented Sep 1, 2017

Thankfully, it appears that I killed the process in the nick of time. I see card holds but no captures. 😓 💦

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Sooooo, we will want to cancel all of those card holds, but we can do that later today.

Contributor

chadwhitacre commented Sep 1, 2017

Sooooo, we will want to cancel all of those card holds, but we can do that later today.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

For now we need to get back on track with notifications.

Contributor

chadwhitacre commented Sep 1, 2017

For now we need to get back on track with notifications.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

And then finish running payday.

Contributor

chadwhitacre commented Sep 1, 2017

And then finish running payday.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

There it is:

gratipay::DATABASE=> select * from paydays order by ts_start desc limit 2;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 341 │ 2017-09-01 08:52:48.150756+00 │ 1970-01-01 00:00:00+00        │   0.00 │      0 │     0 │      0 │
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(2 rows)
Contributor

chadwhitacre commented Sep 1, 2017

There it is:

gratipay::DATABASE=> select * from paydays order by ts_start desc limit 2;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 341 │ 2017-09-01 08:52:48.150756+00 │ 1970-01-01 00:00:00+00        │   0.00 │      0 │     0 │      0 │
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 2017-09-01 08:40:37.939528+00 │ 654.94 │    499 │     2 │    231 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(2 rows)
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

We'll have to clean that up later as well. 😞

Contributor

chadwhitacre commented Sep 1, 2017

We'll have to clean that up later as well. 😞

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

... or now? I believe in order to rerun without picking up the new, wrong payday, what we need to do is delete 341, and reset ts_end on 340 back to 1970-01-01 00:00:00+00.

Contributor

chadwhitacre commented Sep 1, 2017

... or now? I believe in order to rerun without picking up the new, wrong payday, what we need to do is delete 341, and reset ts_end on 340 back to 1970-01-01 00:00:00+00.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
gratipay::DATABASE=> update paydays set ts_end='1970-01-01 00:00:00+00' where id=340;
ERROR:  duplicate key value violates unique constraint "paydays_ts_end_key"
DETAIL:  Key (ts_end)=(1970-01-01 00:00:00+00) already exists.
gratipay::DATABASE=> delete from paydays where id=341;
DELETE 1
gratipay::DATABASE=> update paydays set ts_end='1970-01-01 00:00:00+00' where id=340;
UPDATE 1
gratipay::DATABASE=>
Contributor

chadwhitacre commented Sep 1, 2017

gratipay::DATABASE=> update paydays set ts_end='1970-01-01 00:00:00+00' where id=340;
ERROR:  duplicate key value violates unique constraint "paydays_ts_end_key"
DETAIL:  Key (ts_end)=(1970-01-01 00:00:00+00) already exists.
gratipay::DATABASE=> delete from paydays where id=341;
DELETE 1
gratipay::DATABASE=> update paydays set ts_end='1970-01-01 00:00:00+00' where id=340;
UPDATE 1
gratipay::DATABASE=>
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
gratipay::DATABASE=> select * from paydays order by ts_start desc limit 2;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 1970-01-01 00:00:00+00        │ 654.94 │    499 │     2 │    231 │
│ 339 │ 2017-08-24 21:48:50.552623+00 │ 2017-08-24 21:49:28.799672+00 │ 680.26 │    501 │     2 │    230 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(2 rows)

gratipay::DATABASE=>
Contributor

chadwhitacre commented Sep 1, 2017

gratipay::DATABASE=> select * from paydays order by ts_start desc limit 2;
┌─────┬───────────────────────────────┬───────────────────────────────┬────────┬────────┬───────┬────────┐
│ id  │           ts_start            │            ts_end             │ volume │ nusers │ stage │ nteams │
├─────┼───────────────────────────────┼───────────────────────────────┼────────┼────────┼───────┼────────┤
│ 340 │ 2017-09-01 08:39:53.223145+00 │ 1970-01-01 00:00:00+00        │ 654.94 │    499 │     2 │    231 │
│ 339 │ 2017-08-24 21:48:50.552623+00 │ 2017-08-24 21:49:28.799672+00 │ 680.26 │    501 │     2 │    230 │
└─────┴───────────────────────────────┴───────────────────────────────┴────────┴────────┴───────┴────────┘
(2 rows)

gratipay::DATABASE=>
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Okay! So now a rerun will pick up 340, see stage 2, skip payin and update_stats, and proceed to end and then notify_participants.

Contributor

chadwhitacre commented Sep 1, 2017

Okay! So now a rerun will pick up 340, see stage 2, skip payin and update_stats, and proceed to end and then notify_participants.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

😅

pid-1947 thread-140737185432512 (MainThread) Picking up with an existing payday.
pid-1947 thread-140737185432512 (MainThread) Payday started at 2017-09-01 08:39:53.223145+00:00.
count#npm-sync-lag=1
pid-1947 thread-140737185432512 (MainThread) Greetings, program! It's PAYDAY!!!!
pid-1947 thread-140737185432512 (MainThread) Notifying participants.
pid-1947 thread-140737185432512 (MainThread) Script ran for six seconds (0:00:06.933801).
Contributor

chadwhitacre commented Sep 1, 2017

😅

pid-1947 thread-140737185432512 (MainThread) Picking up with an existing payday.
pid-1947 thread-140737185432512 (MainThread) Payday started at 2017-09-01 08:39:53.223145+00:00.
count#npm-sync-lag=1
pid-1947 thread-140737185432512 (MainThread) Greetings, program! It's PAYDAY!!!!
pid-1947 thread-140737185432512 (MainThread) Notifying participants.
pid-1947 thread-140737185432512 (MainThread) Script ran for six seconds (0:00:06.933801).
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

I really don't like that we're installing cron jobs during payday (could we be flushing email from local!?), but that's another story as well.

Contributor

chadwhitacre commented Sep 1, 2017

I really don't like that we're installing cron jobs during payday (could we be flushing email from local!?), but that's another story as well.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Gosh! Okay!

Contributor

chadwhitacre commented Sep 1, 2017

Gosh! Okay!

@chadwhitacre chadwhitacre reopened this Sep 1, 2017

@rohitpaulk

This comment has been minimized.

Show comment
Hide comment
@rohitpaulk

rohitpaulk Sep 1, 2017

Contributor

That was eventful..

Contributor

rohitpaulk commented Sep 1, 2017

That was eventful..

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

I'm working on canceling the card holds.

screen shot 2017-09-01 at 6 45 19 am

Contributor

chadwhitacre commented Sep 1, 2017

I'm working on canceling the card holds.

screen shot 2017-09-01 at 6 45 19 am

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

There are only ~30 card holds. I might cancel manually in the Braintree dashboard instead of trying to script it in API.

Contributor

chadwhitacre commented Sep 1, 2017

There are only ~30 card holds. I might cancel manually in the Braintree dashboard instead of trying to script it in API.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Although, looking at fetch_card_holds ... it's a static method and if we pass it an empty list of participant_ids it should do what we want.

I think we can just do:

$ heroku run python
[...]
>>> from gratipay.billing.payday import Payday
>>> Payday.fetch_card_holds([])
[]
Contributor

chadwhitacre commented Sep 1, 2017

Although, looking at fetch_card_holds ... it's a static method and if we pass it an empty list of participant_ids it should do what we want.

I think we can just do:

$ heroku run python
[...]
>>> from gratipay.billing.payday import Payday
>>> Payday.fetch_card_holds([])
[]
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
[gratipay] $ honcho run -e defaults.env,local.env env/bin/python < cancel-holds.py 
pid-3003 thread-140737185432512 (MainThread) Fetching card holds.
[gratipay] $
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from gratipay import wireup
from gratipay.billing.payday import Payday

wireup.billing(wireup.env())

Payday.fetch_card_holds([])
Contributor

chadwhitacre commented Sep 1, 2017

[gratipay] $ honcho run -e defaults.env,local.env env/bin/python < cancel-holds.py 
pid-3003 thread-140737185432512 (MainThread) Fetching card holds.
[gratipay] $
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from gratipay import wireup
from gratipay.billing.payday import Payday

wireup.billing(wireup.env())

Payday.fetch_card_holds([])
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Sooo ...

$ heroku run python < cancel-holds.py

You okay with that, @rohitpaulk?

Contributor

chadwhitacre commented Sep 1, 2017

Sooo ...

$ heroku run python < cancel-holds.py

You okay with that, @rohitpaulk?

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

I don't see a side-effect to importing Payday, and wireup.billing also looks safe.

Contributor

chadwhitacre commented Sep 1, 2017

I don't see a side-effect to importing Payday, and wireup.billing also looks safe.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
[gratipay] $ heroku run python < cancel-holds.py > cancel-holds.log 
Running python on gratipay... up, run.5784 (Hobby)
^C[gratipay] $ cat cancel-holds.log 
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from gratipay import wireup

wireup.billing(wireup.env())

print('Greetings, program!')
Python 2.7.11 (default, Oct 26 2016, 16:32:16) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> # -*- coding: utf-8 -*-
teralsom __future__ import absolute_import, division, print_function, unicode_li 
>>> 
>>> from gratipay import wireup
>>> 
>>> wireup.billing(wireup.env())
>>> 
>>> print('Greetings, program!')
Greetings, program!
>>> [gratipay] $
Contributor

chadwhitacre commented Sep 1, 2017

[gratipay] $ heroku run python < cancel-holds.py > cancel-holds.log 
Running python on gratipay... up, run.5784 (Hobby)
^C[gratipay] $ cat cancel-holds.log 
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

from gratipay import wireup

wireup.billing(wireup.env())

print('Greetings, program!')
Python 2.7.11 (default, Oct 26 2016, 16:32:16) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> # -*- coding: utf-8 -*-
teralsom __future__ import absolute_import, division, print_function, unicode_li 
>>> 
>>> from gratipay import wireup
>>> 
>>> wireup.billing(wireup.env())
>>> 
>>> print('Greetings, program!')
Greetings, program!
>>> [gratipay] $
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Better method:

[gratipay] $ heroku run python -c "`cat greetings.py`"
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

print('Greetings, program!')" on ⬢ gratipay... up, run.8444 (Hobby)
Greetings, program!
[gratipay] $
Contributor

chadwhitacre commented Sep 1, 2017

Better method:

[gratipay] $ heroku run python -c "`cat greetings.py`"
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
Running python -c "# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

print('Greetings, program!')" on ⬢ gratipay... up, run.8444 (Hobby)
Greetings, program!
[gratipay] $
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Okay, getting ready to pull the trigger on:

[gratipay] $ heroku run python -c "`cat cancel-holds.py`" 2>&1 | tee cancel-holds.log
from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])
Contributor

chadwhitacre commented Sep 1, 2017

Okay, getting ready to pull the trigger on:

[gratipay] $ heroku run python -c "`cat cancel-holds.py`" 2>&1 | tee cancel-holds.log
from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

3 ...

Contributor

chadwhitacre commented Sep 1, 2017

3 ...

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

2 ...

Contributor

chadwhitacre commented Sep 1, 2017

2 ...

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

1 ...

Contributor

chadwhitacre commented Sep 1, 2017

1 ...

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

0!

Contributor

chadwhitacre commented Sep 1, 2017

0!

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor
Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... starting, run.4177 (Hobby)
Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... connecting, run.4177 (Hobby)
Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... up, run.4177 (Hobby)
pid-4 thread-139695064790784 (MainThread) Fetching card holds.
pid-4 thread-139695064790784 (MainThread) Canceled a $11.13 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.10 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $103.30 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.64 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $20.91 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $13.70 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $20.91 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.36 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.05 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.64 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.87 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.00 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.82 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $103.30 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.52 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $16.79 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.51 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.13 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $19.10 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.10 hold for [].
Contributor

chadwhitacre commented Sep 1, 2017

Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... starting, run.4177 (Hobby)
Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... connecting, run.4177 (Hobby)
Running python -c "from gratipay import wireup
from gratipay.billing.payday import Payday
wireup.billing(wireup.env())
Payday.fetch_card_holds([])" on gratipay... up, run.4177 (Hobby)
pid-4 thread-139695064790784 (MainThread) Fetching card holds.
pid-4 thread-139695064790784 (MainThread) Canceled a $11.13 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.10 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $103.30 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.64 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $20.91 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $13.70 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $20.91 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.36 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.05 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.64 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.87 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.00 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.82 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.61 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $103.30 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.52 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $16.79 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.51 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $11.13 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $19.10 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $12.67 hold for [].
pid-4 thread-139695064790784 (MainThread) Canceled a $10.10 hold for [].
@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

cancel-holds.log appended to gratipay-274.log in gratipay/logs@aa24ac4.

Contributor

chadwhitacre commented Sep 1, 2017

cancel-holds.log appended to gratipay-274.log in gratipay/logs@aa24ac4.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Still held in my bank account per bank's web interface. Will check back later on that.

Contributor

chadwhitacre commented Sep 1, 2017

Still held in my bank account per bank's web interface. Will check back later on that.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

We canceled one extra hold for 12.05 that must've been left over from ... last time? Or something? Otherwise the amounts all line up for the 31 we accidentally created.

Contributor

chadwhitacre commented Sep 1, 2017

We canceled one extra hold for 12.05 that must've been left over from ... last time? Or something? Otherwise the amounts all line up for the 31 we accidentally created.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Oh! Hold placement is multi-threaded so we could've created the 12.05 hold but not logged it.

Contributor

chadwhitacre commented Sep 1, 2017

Oh! Hold placement is multi-threaded so we could've created the 12.05 hold but not logged it.

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Alright! Things to reticket:

Contributor

chadwhitacre commented Sep 1, 2017

Alright! Things to reticket:

@chadwhitacre

This comment has been minimized.

Show comment
Hide comment
@chadwhitacre

chadwhitacre Sep 1, 2017

Contributor

Reticketed! Closing.

Contributor

chadwhitacre commented Sep 1, 2017

Reticketed! Closing.

@gratipay-bot gratipay-bot referenced this issue Sep 7, 2017

Closed

run Gratipay 275 #1156

0 of 15 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment