mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 06:31:27 +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
|
return
|
||||||
|
|
||||||
|
alias.hibp_last_check = arrow.utcnow()
|
||||||
db.session.add(alias)
|
db.session.add(alias)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
@ -840,7 +841,7 @@ async def check_hibp():
|
||||||
or_(Alias.hibp_last_check.is_(None), Alias.hibp_last_check < max_date)
|
or_(Alias.hibp_last_check.is_(None), Alias.hibp_last_check < max_date)
|
||||||
)
|
)
|
||||||
.filter(Alias.enabled)
|
.filter(Alias.enabled)
|
||||||
.order_by(Alias.id)
|
.order_by(Alias.hibp_last_check.asc())
|
||||||
.all()
|
.all()
|
||||||
):
|
):
|
||||||
await queue.put(alias.id)
|
await queue.put(alias.id)
|
||||||
|
|
Loading…
Reference in a new issue