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
else:
weight_explicit = True
cluster_master.host = host
cluster_master.port = port
cluster_master.shared_dir = shared_dir
cluster_master.weight = weight
cluster_master.weight_explicit = weight_explicit
asyncio.run(cluster_master.start())
# Create a new cluster master instance for each start
master = ClusterMaster()
master.host = host
master.port = port
master.shared_dir = shared_dir
master.weight = weight
master.weight_explicit = weight_explicit
asyncio.run(master.start())
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