Merge pull request #2781 from wangweizZZ/issue_2749

[ISSUE #2749]dumpAllTaskMgr did not add the correct processor
This commit is contained in:
yanlinly 2020-06-11 13:49:50 +08:00 committed by GitHub
commit 65c6c8cb27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,6 +93,12 @@ public abstract class DumpService {
this.dumpAllTaskMgr = new TaskManager("com.alibaba.nacos.server.DumpAllTaskManager");
this.dumpAllTaskMgr.setDefaultTaskProcessor(dumpAllProcessor);
this.dumpAllTaskMgr.addProcessor(DumpAllTask.TASK_ID, dumpAllProcessor);
this.dumpAllTaskMgr.addProcessor(DumpAllBetaTask.TASK_ID, dumpAllBetaProcessor);
this.dumpAllTaskMgr.addProcessor(DumpAllTagTask.TASK_ID, dumpAllTagProcessor);
DynamicDataSource.getInstance().getDataSource();
}
@ -124,6 +130,9 @@ public abstract class DumpService {
Runnable dumpAllBeta = () -> dumpAllTaskMgr
.addTask(DumpAllBetaTask.TASK_ID, new DumpAllBetaTask());
Runnable dumpAllTag = () -> dumpAllTaskMgr
.addTask(DumpAllTagTask.TASK_ID, new DumpAllTagTask());
Runnable clearConfigHistory = () -> {
log.warn("clearConfigHistory start");
if (canExecute()) {
@ -212,7 +221,10 @@ public abstract class DumpService {
DUMP_ALL_INTERVAL_IN_MINUTE, TimeUnit.MINUTES);
ConfigExecutor.scheduleWithFixedDelay(dumpAllBeta, initialDelay,
DUMP_ALL_INTERVAL_IN_MINUTE, TimeUnit.MINUTES);
DUMP_ALL_INTERVAL_IN_MINUTE, TimeUnit.MINUTES);
ConfigExecutor.scheduleWithFixedDelay(dumpAllTag, initialDelay,
DUMP_ALL_INTERVAL_IN_MINUTE, TimeUnit.MINUTES);
}
ConfigExecutor