Update hibp_last_check on succesful HIBP check

Accidentally got rid of this during some refactor
This commit is contained in:
Sylvia van Os 2021-05-20 19:00:11 +02:00 committed by GitHub
parent 14bc4f8872
commit 6bcaa6453e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -806,6 +806,7 @@ async def _hibp_check(api_key, queue):
)
return
alias.hibp_last_check = arrow.utcnow()
db.session.add(alias)
db.session.commit()
@ -840,7 +841,7 @@ async def check_hibp():
or_(Alias.hibp_last_check.is_(None), Alias.hibp_last_check < max_date)
)
.filter(Alias.enabled)
.order_by(Alias.id)
.order_by(Alias.hibp_last_check.asc())
.all()
):
await queue.put(alias.id)