another measure to avoid hitting rate limits

This commit is contained in:
codl 2017-09-20 12:41:10 +02:00
parent 33cc82b1ca
commit 53c2e8a023
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 3 additions and 0 deletions

View File

@ -165,6 +165,9 @@ def delete_from_account(account_id):
print("deleting {}".format(to_delete))
account.touch_delete()
action(to_delete)
else:
account.next_delete = (
max(account.next_delete, db.func.now() + timedelta(minutes=3)))
db.session.commit()