updated healthcheck
This commit is contained in:
parent
8d46d0610b
commit
be9b396967
|
@ -218,7 +218,7 @@ public class GeoportalExporter {
|
|||
*/
|
||||
@GET
|
||||
@Path("/export/{type}/healthcheck")
|
||||
@Produces({ MediaType.TEXT_HTML, MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON })
|
||||
@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.TEXT_HTML })
|
||||
public Response healthcheck(@Context HttpServletRequest req, @PathParam(EXPORT_TYPE) String export_type)
|
||||
throws WebApplicationException {
|
||||
|
||||
|
@ -247,13 +247,13 @@ public class GeoportalExporter {
|
|||
theJson.setState("OK");
|
||||
theJson.setMessage(GeoportalExporter.class.getSimpleName() + " Config OK in the context: " + context);
|
||||
String jsonResponse = responseToString(theJson);
|
||||
return Response.ok(jsonResponse).type(MediaType.APPLICATION_JSON).build();
|
||||
return Response.ok(jsonResponse).build();
|
||||
} else {
|
||||
theJson.setState("KO");
|
||||
theJson.setMessage(GeoportalExporter.class.getSimpleName() + " Config "
|
||||
+ Status.NOT_FOUND.getReasonPhrase() + " in the context: " + context);
|
||||
String jsonResponse = responseToString(theJson);
|
||||
return Response.status(Status.NOT_FOUND).entity(jsonResponse).type(MediaType.APPLICATION_JSON).build();
|
||||
return Response.status(Status.NOT_FOUND).entity(jsonResponse).build();
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue