From e4aaef8874d8ebc08bb98951808458850cea2774 Mon Sep 17 00:00:00 2001 From: Florian Bauer Date: Mon, 2 Jan 2023 03:50:59 +0100 Subject: [PATCH] fix: Show proper connection status on tasks if queue was loaded before server scan. --- .../fau/clients/orchestrator/queue/TaskQueueTable.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/de/fau/clients/orchestrator/queue/TaskQueueTable.java b/src/main/java/de/fau/clients/orchestrator/queue/TaskQueueTable.java index cc5e2da..4f07161 100644 --- a/src/main/java/de/fau/clients/orchestrator/queue/TaskQueueTable.java +++ b/src/main/java/de/fau/clients/orchestrator/queue/TaskQueueTable.java @@ -466,9 +466,18 @@ private void updateConnectionStateOfQueueEntries(final ServerContext serverCtx) } } + /** + * Listener function which gets invoked when a server gets added. + * + * @param serverCtx The added server context. + */ @Override public void onServerConnectionAdded(final ServerContext serverCtx) { addUuidToSelectionSet(serverCtx.getServerUuid()); + if (!isEmpty()) { + // Update the loaded task queue in case a preset server showed up. + updateConnectionStateOfQueueEntries(serverCtx); + } } /**