Change heart-beat default database

pull/65/head
Chamindu Senanayake 2 years ago
parent 42d9781d38
commit 17ae023f5c

@ -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");

@ -39,10 +39,10 @@
<{{property_name}}>{{property_value}}</{{property_name}}>
{% endfor %}
{% else %}
<url>jdbc:mysql://localhost:3306/heart_beat</url>
<username>root</username>
<password>root</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<url>jdbc:h2:./repository/database/HEART_BEAT_DB;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>

@ -29,10 +29,10 @@
</jndiConfig>
<definition type="RDBMS">
<configuration>
<url>jdbc:mysql://localhost:3306/heart_beat</url>
<username>root</username>
<password>root</password>
<driverClassName>com.mysql.jdbc.Driver</driverClassName>
<url>jdbc:h2:./repository/database/HEART_BEAT_DB;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE</url>
<username>wso2carbon</username>
<password>wso2carbon</password>
<driverClassName>org.h2.Driver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>

Loading…
Cancel
Save