mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
sleep between mailbox check
This commit is contained in:
parent
c61e7c697d
commit
b79933ba4c
3
cron.py
3
cron.py
@ -1,5 +1,6 @@
|
|||||||
import argparse
|
import argparse
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
import arrow
|
import arrow
|
||||||
from arrow import Arrow
|
from arrow import Arrow
|
||||||
@ -275,6 +276,8 @@ def sanity_check():
|
|||||||
- detect if there's mailbox that's using a invalid domain
|
- detect if there's mailbox that's using a invalid domain
|
||||||
"""
|
"""
|
||||||
for mailbox in Mailbox.filter_by(verified=True).all():
|
for mailbox in Mailbox.filter_by(verified=True).all():
|
||||||
|
# hack to not query DNS too often
|
||||||
|
sleep(1)
|
||||||
if not email_domain_can_be_used_as_mailbox(mailbox.email):
|
if not email_domain_can_be_used_as_mailbox(mailbox.email):
|
||||||
LOG.error(
|
LOG.error(
|
||||||
"issue with mailbox %s domain. #alias %s, nb email log %s",
|
"issue with mailbox %s domain. #alias %s, nb email log %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user