Merge pull request #168 from codl/crash-backoff

refresh_account: increment backoff if something crashes
This commit is contained in:
codl 2019-03-11 03:17:57 +01:00 committed by GitHub
commit 7647ca86fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -316,6 +316,11 @@ def refresh_account(account_id):
make_dormant(account)
if sentry:
sentry.captureException()
except Exception as e:
db.session.rollback()
account.backoff()
db.session.commit()
raise e
finally:
db.session.commit()