Skip to content

Commit

Permalink
Fixed issue with alarm update/create on edge
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-babak committed Nov 22, 2023
1 parent 8f522ea commit e465468
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ protected ListenableFuture<Void> processAlarmMsg(TenantId tenantId, AlarmUpdateM
alarm.setAckTs(alarmUpdateMsg.getAckTs());
alarm.setEndTs(alarmUpdateMsg.getEndTs());
alarm.setDetails(JacksonUtil.toJsonNode(alarmUpdateMsg.getDetails()));
if (UpdateMsgType.ENTITY_CREATED_RPC_MESSAGE.equals(alarmUpdateMsg.getMsgType())) {
Alarm alarmById = alarmService.findAlarmById(tenantId, alarmId);
if (alarmById == null) {
alarmService.createAlarm(AlarmCreateOrUpdateActiveRequest.fromAlarm(alarm, null, alarmId));
} else {
alarmService.updateAlarm(AlarmUpdateRequest.fromAlarm(alarm));
Expand Down

0 comments on commit e465468

Please sign in to comment.