mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-24 04:28:09 +08:00
!193 enhancement #I7GMTS 本地文件监听异常会导致监听线程停止
Merge pull request !193 from Kugaaa/issues/I7GMTS
This commit is contained in:
@@ -63,13 +63,21 @@ public class MonitorFile {
|
||||
@Override
|
||||
public void onFileChange(File file) {
|
||||
LOG.info("file modify,filePath={}", file.getAbsolutePath());
|
||||
FlowExecutorHolder.loadInstance().reloadRule();
|
||||
this.reloadRule();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFileDelete(File file) {
|
||||
LOG.info("file delete,filePath={}", file.getAbsolutePath());
|
||||
FlowExecutorHolder.loadInstance().reloadRule();
|
||||
this.reloadRule();
|
||||
}
|
||||
|
||||
private void reloadRule() {
|
||||
try {
|
||||
FlowExecutorHolder.loadInstance().reloadRule();
|
||||
} catch (Exception e) {
|
||||
LOG.error("reload rule error", e);
|
||||
}
|
||||
}
|
||||
});
|
||||
// 创建文件变化监听器
|
||||
|
||||
Reference in New Issue
Block a user