|
|
|
@ -89,15 +89,17 @@ public class IoTSStartupHandler implements ServerStartupObserver {
|
|
|
|
|
taskInfo.setProperties(dt.getProperties());
|
|
|
|
|
taskManager.registerTask(taskInfo);
|
|
|
|
|
taskManager.rescheduleTask(generatedTaskId);
|
|
|
|
|
log.debug("Task - '" + generatedTaskId + "' updated according to the dynamic task table");
|
|
|
|
|
}
|
|
|
|
|
if (dt.isEnabled()
|
|
|
|
|
&& taskManager.getTaskState(generatedTaskId) == TaskManager.TaskState.PAUSED) {
|
|
|
|
|
taskManager.resumeTask(generatedTaskId);
|
|
|
|
|
log.debug("Task - '" + generatedTaskId + "' enabled according to the dynamic task table");
|
|
|
|
|
} else if (!dt.isEnabled()
|
|
|
|
|
&& taskManager.getTaskState(generatedTaskId) != TaskManager.TaskState.PAUSED) {
|
|
|
|
|
taskManager.pauseTask(generatedTaskId);
|
|
|
|
|
log.debug("Task - '" + generatedTaskId + "' disabled according to the dynamic task table");
|
|
|
|
|
}
|
|
|
|
|
log.info("Task - '" + generatedTaskId + "' updated according to the dynamic task table");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -108,7 +110,7 @@ public class IoTSStartupHandler implements ServerStartupObserver {
|
|
|
|
|
dt.getProperties(), triggerInfo);
|
|
|
|
|
taskManager.registerTask(taskInfo);
|
|
|
|
|
taskManager.scheduleTask(generatedTaskId);
|
|
|
|
|
log.info("New task -'" + generatedTaskId + "' created according to the dynamic task table");
|
|
|
|
|
log.debug("New task -'" + generatedTaskId + "' created according to the dynamic task table");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -122,7 +124,7 @@ public class IoTSStartupHandler implements ServerStartupObserver {
|
|
|
|
|
}
|
|
|
|
|
if (!isExist) {
|
|
|
|
|
taskManager.deleteTask(taskInfo.getName());
|
|
|
|
|
log.info("Task '" + taskInfo.getName() + "' deleted according to the dynamic task table");
|
|
|
|
|
log.debug("Task '" + taskInfo.getName() + "' deleted according to the dynamic task table");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
log.info("Task Comparison Completed and all tasks in current node are updated");
|
|
|
|
|