Create new cluster master instance per start

- Prevents active_jobs from persisting across server restarts
- Eliminates leftover job tracking from previous runs
- Ensures clean state for each server start
parent 61fe95c5
...@@ -1457,12 +1457,14 @@ def start_cluster_master(host: str = '0.0.0.0', port: int = 5003, shared_dir: st ...@@ -1457,12 +1457,14 @@ def start_cluster_master(host: str = '0.0.0.0', port: int = 5003, shared_dir: st
else: else:
weight_explicit = True weight_explicit = True
cluster_master.host = host # Create a new cluster master instance for each start
cluster_master.port = port master = ClusterMaster()
cluster_master.shared_dir = shared_dir master.host = host
cluster_master.weight = weight master.port = port
cluster_master.weight_explicit = weight_explicit master.shared_dir = shared_dir
asyncio.run(cluster_master.start()) master.weight = weight
master.weight_explicit = weight_explicit
asyncio.run(master.start())
if __name__ == "__main__": if __name__ == "__main__":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment