Skip to content

Commit

Permalink
add IDE and sonarlint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcalmer committed Oct 25, 2023
1 parent 0f9654c commit f4dbac8
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ public void eventStreamClosed(int code, String phrase) {
}
catch (SaltException e) {
try {
LOG.error("Unable to connect: {}, retrying in " + DELAY_TIME_SECONDS + " seconds.", e);
Thread.sleep(1000 * DELAY_TIME_SECONDS);
LOG.error("Unable to connect: {}, retrying in {} seconds.", e, DELAY_TIME_SECONDS);
Thread.sleep(1000L * DELAY_TIME_SECONDS);
if (retries == 1) {
MailHelper.withSmtp().sendAdminEmail("Cannot connect to salt event bus",
"salt-api daemon is not responding. Check the status of " +
Expand All @@ -599,6 +599,7 @@ public void eventStreamClosed(int code, String phrase) {
}
catch (InterruptedException e1) {
LOG.error("Interrupted during sleep", e1);
Thread.currentThread().interrupt();
}
}
}
Expand Down Expand Up @@ -1091,7 +1092,7 @@ public void updateSystemInfo(MinionList minionTarget) {
public Optional<SystemInfo> getSystemInfoFull(String minionId) {
return rawJsonCall(State.apply(Collections.singletonList(ApplyStatesEventMessage.SYSTEM_INFO_FULL),
Optional.empty()), minionId)
.flatMap(result -> result.result())
.flatMap(Result::result)
.map(result -> Json.GSON.fromJson(result, SystemInfo.class));
}

Expand Down

0 comments on commit f4dbac8

Please sign in to comment.