diff --git a/apps/users/tasks.py b/apps/users/tasks.py index 16f208fbd..e0051e939 100644 --- a/apps/users/tasks.py +++ b/apps/users/tasks.py @@ -2,6 +2,7 @@ # from celery import shared_task +from django.conf import settings from ops.celery.utils import create_or_update_celery_periodic_tasks from ops.celery.decorator import after_app_ready_start @@ -11,7 +12,6 @@ from .utils import ( send_password_expiration_reminder_mail, send_user_expiration_reminder_mail ) from settings.utils import LDAPUtil -from django.conf import settings logger = get_logger(__file__) diff --git a/config_example.yml b/config_example.yml index 2008ff917..911e7b8ee 100644 --- a/config_example.yml +++ b/config_example.yml @@ -72,6 +72,13 @@ REDIS_PORT: 6379 # RADIUS_PORT: 1812 # RADIUS_SECRET: +# LDAP/AD 设置定时同步参数 +# 启用/禁用 +# AUTH_LDAP_SYNC_IS_PERIODIC: True +# 单位: 时 +# AUTH_LDAP_SYNC_INTERVAL: 12 +# Crontab 表达式 +# AUTH_LDAP_SYNC_CRONTAB: * 6 * * * # OTP settings # OTP/MFA 配置