cleanup and reformat
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-09-05 00:06:35 +02:00
parent 14b54501fd
commit fd2970fa59
81 changed files with 1245 additions and 766 deletions

View File

@@ -16,9 +16,10 @@ public class HeartBeatTask implements Runnable
public void run()
{
String urlString = Cache.getFullHeartBeatLink();
if(urlString == null || urlString.isEmpty()) return;
if (urlString == null || urlString.isEmpty()) return;
try {
try
{
URL heartbeatUrl = new URL(urlString);
@@ -28,17 +29,17 @@ public class HeartBeatTask implements Runnable
connection.setReadTimeout(5000);
int responseCode = connection.getResponseCode();
if(200 <= responseCode && responseCode < 300)
if (200 <= responseCode && responseCode < 300)
{
// only log ok response codes when verbosity is enabled
if(Cache.isVerbose()) LOGGER.info("Heartbeat response code: {}", responseCode);
}
else
if (Cache.isVerbose()) LOGGER.info("Heartbeat response code: {}", responseCode);
} else
{
LOGGER.error("Heartbeat returned problematic response code: {}", responseCode);
}
} catch (IOException e) {
} catch (IOException e)
{
LOGGER.error("Error while trying to push heartbeat", e);
}