-
Notifications
You must be signed in to change notification settings - Fork 308
run Gratipay 156 #3486
Comments
Don't forget to migrate tips to subscriptions for newly accepted teams! |
Teams reviewed (gratipay/inside.gratipay.com#210), still need to migrate tips to subscriptions. |
I decided to go back and review users according to our old pattern, now that we're more confident that we don't have any more payout leaks (cf. #3453). However, there is a bug in the user review dashboard, and I've been setting everyone to suspicious instead of not suspicious. 😞 |
I'm going to break for lunch and coffee, and return to fix that bug and repair the database. Then I'll look at #3473. |
Reticketed review bug as #3496. We are only looking at |
I'm thinking about how to repair the database, at least. |
This selects all 34 relevant events: select ts, payload, payload->'id'
from events
where ts > '2015-05-28 17:00'::timestamptz and ts < '2015-05-28 18:00'::timestamptz
order by ts desc
limit 100; |
I'm going to take the database backup, and then run: update participants
set is_suspicious=null
where id in (
select payload->'id'
from events
where ts > '2015-05-28 17:00'::timestamptz and ts < '2015-05-28 18:00'::timestamptz
);
delete
from events
where ts > '2015-05-28 17:00'::timestamptz and ts < '2015-05-28 18:00'::timestamptz |
Is that so wrong? |
T-3 hours |
I grabbed usernames with: \copy (select username from participants where id in (select (payload->>'id')::int
from events
where ts > '2015-05-28 17:00'::timestamptz and ts < '2015-05-28 18:00'::timestamptz))
to 'is_NOT_suspicious.csv' with csv |
I set #!/usr/bin/env python
import os, requests, sys
user_id = os.environ['GRATIPAY_USER_ID']
api_key = os.environ['GRATIPAY_API_KEY']
for line in sys.stdin:
username = line.strip()
url = 'https://gratipay.com/{}/toggle-is-suspicious.json'.format(username)
response = requests.post(url, data={'to': 'false'}, auth=(user_id, api_key))
print response.status_code, url Two were toggled to select username, is_suspicious
from participants
where id in (
select (payload->>'id')::int
from events
where ts > '2015-05-28 17:00'::timestamptz and ts < '2015-05-28 18:00'::timestamptz
); |
Okay! Back to payday ... |
T-2.5 hours |
Don't forget to migrate tips! Last time: #3399 (comment). |
T-1 hour. @rohitpaulk I think we should bump payroll (#3433) to next week, and focus on Braintree (#3287) for today. |
Not forgetting to merge tips! |
Sorry I was late -
Yep. Braintree is an external deadline, payroll is in our control :) |
@rohitpaulk Want to work on converting tips to subscriptions for new teams since last week? |
Sure, on it. |
!m @rohitpaulk We've missed the bank payout deadline for today. We have so few users and everything is so disrupted, we can probably get away with slipping a few payouts until Monday. :-( Let's land Braintree! |
@rohitpaulk Can you paste your script for migrating tips for the new teams since last week? |
from gratipay import wireup
from gratipay.models.team import Team, AlreadyMigrated
db = wireup.db(wireup.env())
new_teams = db.all("""
SELECT slug
FROM teams
WHERE is_approved IS TRUE
""")
for slug in new_teams:
team = Team.from_slug(slug)
try:
team.migrate_tips()
print("Migrated tips for '%s'" % slug)
except AlreadyMigrated:
print("'%s' already migrated." % slug)
print("Done.") |
|
Cool. Is that in production? (P.S. A couple minor style suggestions ... ) from gratipay.wireup import db, env
from gratipay.models.team import Team, AlreadyMigrated
db = db(env())
new_teams = db.all("""
SELECT teams.*::teams
FROM teams
WHERE is_approved IS TRUE
""")
for team in new_teams:
try:
team.migrate_tips()
print("Migrated tips for '%s'" % slug)
except AlreadyMigrated:
print("'%s' already migrated." % slug)
print("Done.") |
|
This is going quickly! |
|
O.O |
Good effing work, @rohitpaulk. Looks like you nailed it. 🔨 💅 |
Now next week we gotta get you paid again. :) |
Payouts look good in Balanced, no charges there. |
Already? Man that's quick. 😃 |
!m @whit537 |
Hit a bug in MassPay ...
|
I think it's because we're allowing 'null' |
Repaired with: update exchange_routes set fee_cap=20 where network='paypal' and fee_cap is null; |
42 results |
Log downloaded and droplet destroyed. |
MassPay done and posted back for 7 users. |
Escrow shuffled. |
Thaaaaaaaaat is satisfying. Awesome work, @rohitpaulk. I will catch you flip side. 🌝 |
155
The text was updated successfully, but these errors were encountered: