mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 12:41:29 +02:00
refactor
This commit is contained in:
parent
85fb859dcb
commit
f548e74e77
6
cron.py
6
cron.py
@ -709,8 +709,11 @@ def check_custom_domain():
|
||||
LOG.d("Check verified domain for DNS issues")
|
||||
|
||||
for custom_domain in CustomDomain.filter_by(verified=True): # type: CustomDomain
|
||||
mx_domains = get_mx_domains(custom_domain.domain)
|
||||
check_single_custom_domain(custom_domain)
|
||||
|
||||
|
||||
def check_single_custom_domain(custom_domain):
|
||||
mx_domains = get_mx_domains(custom_domain.domain)
|
||||
if not is_mx_equivalent(mx_domains, EMAIL_SERVERS_WITH_PRIORITY):
|
||||
user = custom_domain.user
|
||||
LOG.w(
|
||||
@ -745,7 +748,6 @@ def check_custom_domain():
|
||||
else:
|
||||
# reset checks
|
||||
custom_domain.nb_failed_checks = 0
|
||||
|
||||
Session.commit()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user