Skip to content

Commit

Permalink
Remove registred task when restarting instance
Browse files Browse the repository at this point in the history
  • Loading branch information
cnapagoda committed Aug 17, 2015
1 parent 543f107 commit 6b8bbca
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ protected void setTaskService(TaskService taskService) {
}

private void registerTasks(TaskManager taskManager) throws TaskException {
try {
for (TaskInfo taskInfo : taskManager.getAllTasks()) {
taskManager.deleteTask(taskInfo.getName());
}
} catch (TaskException ignore){

}
String configPath = CarbonUtils.getRegistryXMLPath();
if (configPath != null) {
File registryXML = new File(configPath);
Expand Down

0 comments on commit 6b8bbca

Please sign in to comment.