diff options
| author | konstpic <156318483+konstpic@users.noreply.github.com> | 2025-09-28 22:00:16 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2025-09-28 22:04:54 +0300 |
| commit | 28a17a80ec0c4a0f82e8acfca351651d762b3ec9 (patch) | |
| tree | 7902b7b4cba04bce816ad17c9490f7228574a096 /web/web.go | |
| parent | 30565833889171afe5c934f97bc0e767534e8310 (diff) | |
feat: add ldap component (#3568)
* add ldap component
* fix: fix russian comments, tls cert verify default true
* feat: remove replaces go mod for local dev
Diffstat (limited to 'web/web.go')
| -rw-r--r-- | web/web.go | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -314,6 +314,18 @@ func (s *Server) startTask() { // Run once a month, midnight, first of month s.cron.AddJob("@monthly", job.NewPeriodicTrafficResetJob("monthly")) + // 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) + } + + // Make a traffic condition every day, 8:30 var entry cron.EntryID isTgbotenabled, err := s.settingService.GetTgbotEnabled() |
