mirror of
https://github.com/romanz/electrs.git
synced 2024-11-19 09:54:09 +01:00
Add health-check tool
This commit is contained in:
parent
165db08587
commit
edcee0ba8e
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…
Reference in New Issue
Block a user