mirror of
https://github.com/simple-login/app.git
synced 2024-11-17 22:21:38 +08:00
Merge pull request #479 from TheLastProject/patch-1
Update hibp_last_check on succesful HIBP check
This commit is contained in:
commit
7a1a1d3a01
1 changed files with 2 additions and 1 deletions
3
cron.py
3
cron.py
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue