fix: comment out some blocks to debug & thread join()
This commit is contained in:
parent
d35ee68ccb
commit
7f650d0673
@ -191,11 +191,11 @@ class ClusterCommunicationModule():
|
|||||||
print(f"Worker {conn_index} run")
|
print(f"Worker {conn_index} run")
|
||||||
for i in range(7):
|
for i in range(7):
|
||||||
print(f"[WORKER {conn_index}] {i}")
|
print(f"[WORKER {conn_index}] {i}")
|
||||||
|
time.sleep(1)
|
||||||
print(f"Worker {conn_index} finished")
|
print(f"Worker {conn_index} finished")
|
||||||
|
|
||||||
threads = []
|
threads = []
|
||||||
master_t = threading.Thread(target=master_run, args=(image_name, ))
|
master_t = threading.Thread(target=master_run, args=(image_name, ))
|
||||||
master_t.join()
|
|
||||||
threads.append(master_t)
|
threads.append(master_t)
|
||||||
|
|
||||||
for index, conn in enumerate(self.worker_conns):
|
for index, conn in enumerate(self.worker_conns):
|
||||||
@ -204,11 +204,12 @@ class ClusterCommunicationModule():
|
|||||||
print(command)
|
print(command)
|
||||||
|
|
||||||
t = threading.Thread(target=send_and_wait, args=(index, conn, image_name))
|
t = threading.Thread(target=send_and_wait, args=(index, conn, image_name))
|
||||||
t.join()
|
|
||||||
threads.append(t)
|
threads.append(t)
|
||||||
|
|
||||||
for thread in threads:
|
for thread in threads:
|
||||||
thread.start()
|
thread.start()
|
||||||
|
for thread in threads:
|
||||||
|
thread.join()
|
||||||
|
|
||||||
print("[INFO] All workers finished.")
|
print("[INFO] All workers finished.")
|
||||||
|
|
||||||
|
|||||||
@ -85,6 +85,7 @@ class NodeManager():
|
|||||||
print(f"And we have load your wallet private key {WALLET_KEY} (address={self.wallet.address})")
|
print(f"And we have load your wallet private key {WALLET_KEY} (address={self.wallet.address})")
|
||||||
print()
|
print()
|
||||||
if self.w3.is_connected():
|
if self.w3.is_connected():
|
||||||
|
'''
|
||||||
print("[INFO] Connected Successfully.")
|
print("[INFO] Connected Successfully.")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
@ -116,6 +117,9 @@ class NodeManager():
|
|||||||
print("\n[INFO] You Receive a new task:")
|
print("\n[INFO] You Receive a new task:")
|
||||||
print(f" - Download Image: {data_image}")
|
print(f" - Download Image: {data_image}")
|
||||||
print(f" - Training Image: {train_image}")
|
print(f" - Training Image: {train_image}")
|
||||||
|
'''
|
||||||
|
|
||||||
|
data_image = "test/test"
|
||||||
|
|
||||||
# Start Downloading
|
# Start Downloading
|
||||||
self.cluster_communication_module.run_container(data_image)
|
self.cluster_communication_module.run_container(data_image)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user