Skip to content

Commit

Permalink
Expose isReady over HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
gartens committed Apr 30, 2024
1 parent 3fde13b commit b4a6117
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions dbms/src/main/java/org/polypheny/db/PolyphenyDb.java
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ public void join( final long millis ) throws InterruptedException {
log.info( " http://localhost:{}", RuntimeConfig.WEBUI_SERVER_PORT.getInteger() );
log.info( "****************************************************************************************************" );
isReady = true;
server.setReady( true );

// Initialize statistic settings
StatisticsManager.getInstance().initializeStatisticSettings();
Expand Down
5 changes: 5 additions & 0 deletions webui/src/main/java/org/polypheny/db/webui/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.util.function.BiFunction;
import java.util.function.Consumer;
import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.polypheny.db.StatusNotificationService;
import org.polypheny.db.catalog.exceptions.GenericRuntimeException;
Expand All @@ -59,6 +60,8 @@ public class HttpServer implements Runnable {
private static HttpServer INSTANCE = null;
@Getter
private WebSocket webSocketHandler;
@Setter
private boolean isReady = false;


public static HttpServer getInstance() {
Expand Down Expand Up @@ -283,6 +286,8 @@ private void attachRoutes( Javalin webuiServer, Crud crud ) {

webuiServer.get( "/product", ctx -> ctx.result( "Polypheny-DB" ) );

webuiServer.get( "/isReady", ctx -> ctx.result( String.valueOf( isReady ) ) );

}


Expand Down

0 comments on commit b4a6117

Please sign in to comment.