From a186e1bbf9bffc205d4404f7477bad29b5df25f9 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 4 Mar 2024 14:51:42 +0100 Subject: [PATCH] WIP:refactor: Refined channel-states, introduced `ChannelState` -- ALIGN --- .../chat/backend/implementation/kafka/ConsumerTaskRunner.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java index c2c28014..0c6de1d5 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java +++ b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/ConsumerTaskRunner.java @@ -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(); -- 2.20.1