From 32b965ab2a11d17772ad7d135b426493c48b6247 Mon Sep 17 00:00:00 2001 From: warunalakshitha Date: Wed, 11 Dec 2024 14:26:22 +0530 Subject: [PATCH] Check server up --- .../stdlib/graphql/runtime/utils/Utils.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/native/src/main/java/io/ballerina/stdlib/graphql/runtime/utils/Utils.java b/native/src/main/java/io/ballerina/stdlib/graphql/runtime/utils/Utils.java index d1fbab02c..d6af3ed11 100644 --- a/native/src/main/java/io/ballerina/stdlib/graphql/runtime/utils/Utils.java +++ b/native/src/main/java/io/ballerina/stdlib/graphql/runtime/utils/Utils.java @@ -50,8 +50,16 @@ private Utils() { static { Thread.startVirtualThread(() -> { try { - Thread.sleep(5 * 60 * 1000); - getStrandDump(); + int count = 0; + while (true) { + Thread.sleep(count); + count += 500; + PrintStream out = System.out; + out.println("COUNT =" + count); + if (count == 300000) { + getStrandDump(); + } + } } catch (InterruptedException | IOException e) { throw new RuntimeException(e); }