diff --git a/src/communication.py b/src/communication.py index f42083c..efcac2a 100644 --- a/src/communication.py +++ b/src/communication.py @@ -89,10 +89,13 @@ class ClusterCommunicationModule(): data = {'host': self.host, 'GPU': self.node_manager.GPU, 'GPU_num': self.node_manager.GPU_num} self.client_sock.send(json.dumps(data).encode()) elif command == '[STOP]': + print("Receive STOP signal") self.node_manager.docker_client.swarm.leave() data = {'host': self.host} self.client_sock.send(f'[STOP_CHECK] {json.dumps(data)}'.encode()) + self.node_manager.exit() + return True def request(self, host): # master side