Merge pull request #168 from codl/crash-backoff
refresh_account: increment backoff if something crashes
This commit is contained in:
commit
7647ca86fc
5
tasks.py
5
tasks.py
|
@ -316,6 +316,11 @@ def refresh_account(account_id):
|
||||||
make_dormant(account)
|
make_dormant(account)
|
||||||
if sentry:
|
if sentry:
|
||||||
sentry.captureException()
|
sentry.captureException()
|
||||||
|
except Exception as e:
|
||||||
|
db.session.rollback()
|
||||||
|
account.backoff()
|
||||||
|
db.session.commit()
|
||||||
|
raise e
|
||||||
finally:
|
finally:
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue