Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
process healthcheck if timestamp is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
kinarashah authored and Alena Prokharchyk committed Apr 8, 2019
1 parent d8879f2 commit eb5b155
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
import javax.inject.Inject;
import javax.inject.Named;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;



@Named
Expand All @@ -25,6 +28,8 @@ public class ServiceEventCreate extends AbstractObjectProcessHandler implements

@Inject
ServiceDao serviceDao;

private static final Logger log = LoggerFactory.getLogger(ServiceEventCreate.class);

@Override
public String[] getProcessNames() {
Expand Down Expand Up @@ -67,6 +72,10 @@ private void processHealthcheck(ServiceEvent event) {
uuid = splitted[0];
}
if (uuid != null) {
if(event.getExternalTimestamp() == null) {
log.warn("ExternalTimestamp null for event {} hostMapUUID {}", event.getId(), uuid);
return;
}
healthcheckService.updateHealthcheck(uuid, event.getExternalTimestamp(),
getHealthState(event.getReportedHealth()));
}
Expand Down

0 comments on commit eb5b155

Please sign in to comment.