refresh_account: increment backoff if something crashes
this is kind of a hotfix for the thing with pleroma returning bad error messages crashing mastodon.py. but it's good practice anyway
This commit is contained in:
parent
78c84ed92c
commit
84089f8a40
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