mirror of
https://github.com/romanz/electrs.git
synced 2025-02-24 06:57:53 +01:00
Add health-check tool
This commit is contained in:
parent
e0eae37333
commit
5510740a02
1 changed files with 15 additions and 0 deletions
15
contrib/health_check.py
Executable file
15
contrib/health_check.py
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import client
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("host")
|
||||
parser.add_argument("port", type=int)
|
||||
args = parser.parse_args()
|
||||
|
||||
conn = client.Client((args.host, args.port))
|
||||
print(conn.call("server.version", "health_check", "1.4")["result"])
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Add table
Reference in a new issue