Skip to content

Commit ebcb8c7

Browse files
committed
handle multiple timekeepers
1 parent d5506cc commit ebcb8c7

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

scripts/launch-nodes/manage_subspace.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -239,17 +239,18 @@ def main():
239239

240240
# Step 1: Handle the timekeeper node, if enabled
241241
if not args.no_timekeeper and timekeeper_node:
242-
try:
243-
logger.info(f"Connecting to timekeeper node {timekeeper_node['host']}...")
244-
client = ssh_connect(timekeeper_node['host'], timekeeper_node['user'], timekeeper_node['ssh_key'])
245-
handle_node(client, timekeeper_node, args.subspace_dir, args.release_version,
246-
pot_external_entropy=args.pot_external_entropy, network=args.network,
247-
prune=args.prune, restart=args.restart)
248-
except Exception as e:
249-
logger.error(f"Error handling timekeeper node: {e}")
250-
finally:
251-
if client:
252-
client.close()
242+
for node in timekeeper_node:
243+
try:
244+
logger.info(f"Connecting to timekeeper node {node['host']}...")
245+
client = ssh_connect(node['host'], node['user'], node['ssh_key'])
246+
handle_node(client, node, args.subspace_dir, args.release_version,
247+
pot_external_entropy=args.pot_external_entropy, network=args.network,
248+
prune=args.prune, restart=args.restart)
249+
except Exception as e:
250+
logger.error(f"Error handling timekeeper node: {e}")
251+
finally:
252+
if client:
253+
client.close()
253254
else:
254255
logger.info("Timekeeper handling is disabled or not specified.")
255256

0 commit comments

Comments
 (0)