Browse Source

[Feature] 添加同步 LDAP/AD 用户的定时任务3

pull/3295/head
BaiJiangJie 5 years ago
parent
commit
fa1a167f8e
  1. 2
      apps/users/tasks.py
  2. 7
      config_example.yml

2
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__)

7
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 配置

Loading…
Cancel
Save