Commit 61499a4c authored by Matija Obreza's avatar Matija Obreza

Log relevant information inside the upsert call

parent 417cbe87
Pipeline #1250 passed with stage
in 38 seconds
......@@ -332,6 +332,9 @@ public class GenesysClient {
if (postBody != null) {
// System.err.println("Adding data: " + data);
if (_log.isTraceEnabled()) {
_log.trace("Body: " + postBody);
}
request.addPayload(postBody);
}
......@@ -531,6 +534,9 @@ public class GenesysClient {
final long sleepTime = (long) (Math.pow(2, retry) * 100 + Math.pow(2, retry) * 2500 * Math.random());
_log.warn("Retrying PUT after " + sleepTime + " ms.");
Thread.sleep(sleepTime);
} catch (final GenesysApiException e) {
_log.error("Failed to upload data: " + data);
throw e;
}
}
throw new RuntimeException("All retries failed");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment