|
|
@@ -26,18 +26,18 @@ public class DeviceDataSyncService {
|
|
|
* fixedDelay:任务执行完成后固定延迟29分钟执行下一次
|
|
|
* initialDelay:初始化后立即执行第一次任务
|
|
|
*/
|
|
|
- // @Scheduled(fixedDelay = 2 * 60 * 1000, initialDelay = 0)
|
|
|
- // public void scheduledDeviceDataSync() {
|
|
|
- // Integer tenantId = 1222;
|
|
|
- // Long engineeringId = 3101100021L;
|
|
|
- // String username = "3101100021";
|
|
|
- // String password = "SIixzph1";
|
|
|
- // log.info("开始执行桃浦象屿人防设备数据同步定时任务,租户ID:{},工程ID:{}", tenantId, engineeringId);
|
|
|
- //
|
|
|
- // try {
|
|
|
- // iotDataTransferService.synchronizeDeviceData(tenantId, engineeringId, username, password);
|
|
|
- // } catch (Exception e) {
|
|
|
- // log.error("定时任务执行设备数据同步失败:{}", e.getMessage(), e);
|
|
|
- // }
|
|
|
- // }
|
|
|
+ @Scheduled(fixedDelay = 5 * 60 * 1000, initialDelay = 0)
|
|
|
+ public void scheduledDeviceDataSync() {
|
|
|
+ Integer tenantId = 1222;
|
|
|
+ Long engineeringId = 3101100021L;
|
|
|
+ String username = "3101100021";
|
|
|
+ String password = "SIixzph1";
|
|
|
+ log.info("开始执行桃浦象屿人防设备数据同步定时任务,租户ID:{},工程ID:{}", tenantId, engineeringId);
|
|
|
+
|
|
|
+ try {
|
|
|
+ iotDataTransferService.synchronizeDeviceData(tenantId, engineeringId, username, password);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("定时任务执行设备数据同步失败:{}", e.getMessage(), e);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|