mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 08:58:30 +01:00
Add missing eagerloads
This commit is contained in:
parent
68ef8ac43d
commit
dc8c44e581
1 changed files with 8 additions and 4 deletions
12
cron.py
12
cron.py
|
@ -905,10 +905,14 @@ def check_mailbox_valid_pgp_keys():
|
|||
|
||||
def check_custom_domain():
|
||||
# Delete custom domains that haven't been verified in a month
|
||||
for custom_domain in CustomDomain.filter(
|
||||
CustomDomain.verified == False, # noqa: E712
|
||||
CustomDomain.created_at < arrow.now().shift(months=-1),
|
||||
).yield_per(100):
|
||||
for custom_domain in (
|
||||
CustomDomain.filter(
|
||||
CustomDomain.verified == False, # noqa: E712
|
||||
CustomDomain.created_at < arrow.now().shift(months=-1),
|
||||
)
|
||||
.enable_eagerloads(False)
|
||||
.yield_per(100)
|
||||
):
|
||||
alias_count = Alias.filter(Alias.custom_domain_id == custom_domain.id).count()
|
||||
if alias_count > 0:
|
||||
LOG.warn(
|
||||
|
|
Loading…
Reference in a new issue