Shutdown command

This commit is contained in:
Ben Meadors
2022-01-21 18:11:26 -06:00
parent b15e5f516a
commit 8ceb9faf2d
3 changed files with 39 additions and 0 deletions

View File

@@ -285,6 +285,14 @@ class Node:
return self._sendAdmin(p)
def shutdown(self, secs: int = 10):
"""Tell the node to shutdown."""
p = admin_pb2.AdminMessage()
p.shutdown_seconds = secs
logging.info(f"Telling node to shutdown in {secs} seconds")
return self._sendAdmin(p)
def _fixupChannels(self):
"""Fixup indexes and add disabled channels as needed"""