Finish implementing configuration file
All checks were successful
continuous-integration/drone/push Build is passing

Configuration file is now fully functional.
Startup arguments for bot token and heartbeat key have now been removed.
This commit is contained in:
2022-11-22 00:04:34 +01:00
parent b6bf366822
commit 843ee43275
6 changed files with 57 additions and 49 deletions

View File

@@ -21,10 +21,9 @@ public class HeartBeatTask implements Runnable
@Override
public void run()
{
String apiKey = Cache.getHeartBeatApiKey();
if(apiKey == null || apiKey.isEmpty()) return;
String urlString = Cache.getFullHeartBeatLink();
if(urlString == null || urlString.isEmpty()) return;
try {
URL heartbeatUrl = new URL(urlString);
@@ -46,7 +45,7 @@ public class HeartBeatTask implements Runnable
}
} catch (IOException e) {
logger.log("Error while trying to push heartbeat: " + e.getMessage());
logger.log("Error while trying to push heartbeat: " + e.getMessage() + ", " + e.getCause().getMessage());
}
}