Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
larsLotNav committed Aug 23, 2023
1 parent 6ba6eee commit eea5d8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/no/nav/statusportalgcppoll/Poller.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.util.UUID;


public class Poller {
Expand All @@ -37,7 +38,6 @@ public static RecordDto poll(ServiceDto serviceDto){

System.out.println("Unresponsive endpoint for service: "+ serviceDto.getId());
System.out.println("Polling url: "+ serviceDto.getPollingUrl());
// System.out.println(e.getMessage());
return createPolledServiceStatusForUnresponsiveEndpoint(serviceDto);

}
Expand All @@ -50,6 +50,10 @@ private static RecordDto getPolledServiceStatus(ServiceDto serviceDto) throws IO
JsonObject jsonObject = toJson(bodyString);
RecordDto recordDto = mapToRecordDto(jsonObject);
recordDto.setTimestamp(OffsetDateTime.now());
if(serviceDto.getId().equals(UUID.fromString("4d4b690b-9402-49a6-a265-256616c2f017"))){
System.out.println(serviceDto.getPollingUrl());
System.out.println(serviceDto.getPollingUrl().equals(STATUSHOLDER));
}
RecordSourceDto source = serviceDto.getPollingUrl().equals(STATUSHOLDER)? RecordSourceDto.OBM:RecordSourceDto.GCP_POLL;
recordDto.setSource(source);
recordDto.serviceId(serviceDto.getId());
Expand Down

0 comments on commit eea5d8c

Please sign in to comment.