WIP:refactor: Refined channel-states, introduced `ChannelState` -- ALIGN
authorKai Moritz <kai@juplo.de>
Mon, 4 Mar 2024 13:51:42 +0000 (14:51 +0100)
committerKai Moritz <kai@juplo.de>
Mon, 4 Mar 2024 13:51:42 +0000 (14:51 +0100)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java

index c2c2801..0c6de1d 100644 (file)
@@ -21,9 +21,9 @@ public class ConsumerTaskRunner
   public void joinConsumerTasks() throws InterruptedException
   {
     dataChannelConsumerTaskExecutor.joinConsumerTaskJob();
-    while (infoChannel.isLoadInProgress())
+    while (infoChannel.getChannelState() != ChannelState.SHUTTING_DOWN)
     {
-      log.info("Waiting for {} to finish loading...", infoChannel);
+      log.info("Waiting for {} to shut down...", infoChannel);
       Thread.sleep(1000);
     }
     infoChannelConsumerTaskExecutor.joinConsumerTaskJob();