精简: 去掉 LDAP(目录登录+用户同步): util/ldap 包、同步 job、登录分支、全部 ldap* 设置

This commit is contained in:
Muse
2026-10-20 10:04:28 +00:00
parent f9b0672d84
commit 7ece6e079b
11 changed files with 114 additions and 947 deletions
-11
View File
@@ -372,17 +372,6 @@ func (s *Server) startTask(restartXray bool, loc *time.Location) {
// Check monthly reset days at midnight
_, _ = s.cron.AddJob("@daily", job.NewPeriodicTrafficResetJob("monthly", loc))
// LDAP sync scheduling
if ldapEnabled, _ := s.settingService.GetLdapEnable(); ldapEnabled {
runtime, err := s.settingService.GetLdapSyncCron()
if err != nil || runtime == "" {
runtime = "@every 1m"
}
j := job.NewLdapSyncJob()
// job has zero-value services with method receivers that read settings on demand
_, _ = s.cron.AddJob(runtime, j)
}
// Telegram-bot–dependent jobs: periodic stats report + callback-hash cleanup.
isTgbotenabled, err := s.settingService.GetTgbotEnabled()
if (err == nil) && isTgbotenabled {