Skip to content

Commit

Permalink
Merge pull request #127 from Foxikle/fix/logging
Browse files Browse the repository at this point in the history
Kubernetes fixing
  • Loading branch information
webhead1104 authored Jun 20, 2024
2 parents 5a5bc9b + f2313fb commit 59adc92
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/main/java/net/cytonic/cytosis/Cytosis.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ private Cytosis() {
* @param args Runtime flags
*/
public static void main(String[] args) {
System.out.println("This is a test for gke1");
System.out.println("This is a test for gke2");
System.out.println("This is a test for gke3");
System.out.println("This is a test for gke4");



FLAGS = List.of(args);
long start = System.currentTimeMillis();
// Initialize the server
Expand Down Expand Up @@ -335,12 +342,16 @@ public static void completeNonEssentialTasks(long start) {

Thread.ofVirtual().name("WorldLoader").start(Cytosis::loadWorld);

try {
Logger.info("Starting Containerized Instance Manager");
containerizedInstanceManager = new ContainerizedInstanceManager();

} catch (Exception e) {
Logger.error("An error occurred whilst loading the kubernetes setup!", e);
if (FLAGS.contains("--skip-kubernetes") || FLAGS.contains("--skip-k8s")) {
Logger.warn("Skipping Kubernetes setup");
CytosisSettings.KUBERNETES_SUPPORTED = false;
} else {
try {
Logger.info("Starting Containerized Instance Manager");
containerizedInstanceManager = new ContainerizedInstanceManager();
} catch (Exception e) {
Logger.error("An error occurred whilst loading the kubernetes setup!", e);
}
}

// Start the server
Expand All @@ -350,6 +361,7 @@ public static void completeNonEssentialTasks(long start) {
long end = System.currentTimeMillis();
Logger.info(STR."Server started in \{end - start}ms!");
Logger.info(STR."Server id = \{SERVER_ID}");
System.out.println("This is a test for gke5");

if (FLAGS.contains("--ci-test")) {
Logger.info("Stopping server due to '--ci-test' flag.");
Expand Down

0 comments on commit 59adc92

Please sign in to comment.