Browse Source

Pull request #9180: REPORT-73318【设计器环境监测】服务器finedb有脏数据,设计器远程切换,过程很慢且没有自动监测弹窗

Merge in DESIGN/design from ~HARRISON/design:feature/x to feature/x

* commit '36779698ebaf51dd45bec9c5c8c6735402e95822':
  REPORT-73318【设计器环境监测】服务器finedb有脏数据,设计器远程切换,过程很慢且没有自动监测弹窗 1-补充日志 2-修复一个问题,要执行完之后移除,不然在 UI 线程中不执行了
feature/x
Harrison 2 years ago
parent
commit
273d6eea84
  1. 10
      designer-base/src/main/java/com/fr/env/detect/EnvDetectorCenter.java

10
designer-base/src/main/java/com/fr/env/detect/EnvDetectorCenter.java vendored

@ -17,6 +17,7 @@ import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.event.Null;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.core.UUID;
import com.fr.task.Once;
import com.fr.update.delay.DelayHelper;
@ -46,12 +47,14 @@ public class EnvDetectorCenter {
public void on(Event event, Null param) {
// startup 的监听,执行一次即可
EventDispatcher.stopListen(this);
FineLoggerFactory.getLogger().debug("startup complete, start detecting env");
stop();
}
};
private final Listener<Workspace> AFTER_SWITCH_LISTENER = new Listener<Workspace>() {
@Override
public void on(Event event, Workspace param) {
FineLoggerFactory.getLogger().debug("switch env complete, start detecting env");
stop();
}
};
@ -158,6 +161,7 @@ public class EnvDetectorCenter {
.map(DetectorUtil::convert2Notification)
.collect(Collectors.toList());
if (Collections.isEmpty(notificationModels)) {
FineLoggerFactory.getLogger().debug("detector not found any exception");
return;
}
@ -169,10 +173,10 @@ public class EnvDetectorCenter {
}
NotificationDialog dialog = new NotificationDialog(properties, notificationModels);
dialog.open();
});
// 执行完移除
pendingActions.remove(uuid);
// 执行完移除
pendingActions.remove(uuid);
});
};

Loading…
Cancel
Save