Skip to content

Commit 9aaca83

Browse files
committed
CHANGES:
- /node offline shuts down nodes concurrently now
1 parent b0cfacd commit 9aaca83

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

plugins/admin/commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -888,9 +888,9 @@ async def _node_offline(node_name: str):
888888
if node:
889889
await _node_offline(node.name)
890890
else:
891-
for node in await self.node.get_active_nodes():
892-
await _node_offline(node)
893-
await _node_offline(self.node.name)
891+
tasks = [_node_offline(node.name) for node in self.bus.nodes.values()]
892+
tasks.append(_node_offline(self.node.name))
893+
await asyncio.gather(*tasks)
894894

895895
@node_group.command(description=_('Clears the maintenance mode for all servers'))
896896
@app_commands.guild_only()

0 commit comments

Comments
 (0)