-
Notifications
You must be signed in to change notification settings - Fork 309
run Gratipay 130 #2964
Comments
Reviewed 36 (26) accounts. |
Droplet spun up and updated. |
Backup taken and verified. |
Script started ... aaaaaaaand it crashed:
|
|
I mean, WTF? |
Yeah, |
Since we didn't make it out of the card holds loop, we should be able to rerun without any modifications (we should be able to rerun without modifications no matter when we crash, but that's another story). |
I have a hack for the tracebacks in import sys
import traceback
def threaded_map(func, iterable, threads=5):
pool = ThreadPool(threads)
def g(*a, **kw):
try:
return func(*a, **kw)
except Exception:
raise sys.exc_info()[0](traceback.format_exc())
r = pool.map(g, iterable)
pool.close()
pool.join()
return r |
@Changaco We might also consider using |
At this point that info is lost and I think our options are to try to debug this blind or simply rerun. |
@Changaco Rerunning with your hack for now ... |
diff --git a/gratipay/billing/payday.py b/gratipay/billing/payday.py
index 0063642..28525e8 100644
--- a/gratipay/billing/payday.py
+++ b/gratipay/billing/payday.py
@@ -32,7 +32,12 @@ with open('fake_payday.sql') as f:
def threaded_map(func, iterable, threads=5):
pool = ThreadPool(threads)
- r = pool.map(func, iterable)
+ def g(*a, **kw):
+ try:
+ return func(*a, **kw)
+ except Exception:
+ raise sys.exc_info()[0](traceback.format_exc())
+ r = pool.map(g, iterable)
pool.close()
pool.join()
return r |
Oops. :-)
|
diff --git a/gratipay/billing/payday.py b/gratipay/billing/payday.py
index 0063642..95cad68 100644
--- a/gratipay/billing/payday.py
+++ b/gratipay/billing/payday.py
@@ -12,6 +12,8 @@ immediately affect the participant's balance.
from __future__ import unicode_literals
import itertools
+import sys
+import traceback
from multiprocessing.dummy import Pool as ThreadPool
from balanced import CardHold
@@ -32,7 +34,12 @@ with open('fake_payday.sql') as f:
def threaded_map(func, iterable, threads=5):
pool = ThreadPool(threads)
- r = pool.map(func, iterable)
+ def g(*a, **kw):
+ try:
+ return func(*a, **kw)
+ except Exception:
+ raise sys.exc_info()[0](traceback.format_exc())
+ r = pool.map(g, iterable)
pool.close()
pool.join()
return r |
Looks like it's running fine now. Kinda bummed that we apparently hit a second exception but my bad patch didn't catch it. :-( |
Script ran for 10 minutes (0:10:18.257751). |
Wow, lost another big giver this week. We're almost back to $10,000! |
Log downloaded and droplet destroyed. |
MassPay done and posted back for 73 users. |
Escrow shuffled. |
129
The text was updated successfully, but these errors were encountered: