From dd67d88da07ddb4b2b6c797083f08af4b3beecc4 Mon Sep 17 00:00:00 2001 From: snsd0805 Date: Fri, 31 May 2024 01:40:18 +0800 Subject: [PATCH] fix: update actions when the worker knows the master has leaved --- src/communication.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/communication.py b/src/communication.py index 390f24a..ec416bc 100644 --- a/src/communication.py +++ b/src/communication.py @@ -97,8 +97,13 @@ class ClusterCommunicationModule(): self.client_sock.send(f'[STOP_CHECK] {json.dumps(data)}'.encode()) self.node_manager.docker_client.swarm.leave() self.node_manager.status = 'none' + self.node_manager.actions = [ + {'explanation': 'Add another node into our cluster', 'function': 'add_node'}, + {'explanation': 'Exit', 'function': 'exit'}, + ] print("You have leaved the cluster.") + print("Please Enter to continued") return False