mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-07-23 17:49:34 +08:00
fixed: 定时任务的执行时机
This commit is contained in:
parent
5dcde4f911
commit
e8399362ea
@ -33,17 +33,17 @@ public class LDAPSchedule {
|
||||
|
||||
@Scheduled(fixedRate = 3600000)
|
||||
public void sync() {
|
||||
if (!ldapBus.enabledLDAP()) {
|
||||
log.info("未配置LDAP服务");
|
||||
return;
|
||||
}
|
||||
|
||||
// 系统刚启动不执行
|
||||
if (times == 0) {
|
||||
times++;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ldapBus.enabledLDAP()) {
|
||||
log.info("未配置LDAP服务");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
ldapBus.departmentSync();
|
||||
} catch (Exception e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user