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)
|
@Scheduled(fixedRate = 3600000)
|
||||||
public void sync() {
|
public void sync() {
|
||||||
if (!ldapBus.enabledLDAP()) {
|
|
||||||
log.info("未配置LDAP服务");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 系统刚启动不执行
|
// 系统刚启动不执行
|
||||||
if (times == 0) {
|
if (times == 0) {
|
||||||
times++;
|
times++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ldapBus.enabledLDAP()) {
|
||||||
|
log.info("未配置LDAP服务");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ldapBus.departmentSync();
|
ldapBus.departmentSync();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user