1
0
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:
Roman Zeyde 2020-11-15 22:25:57 +02:00
parent 165db08587
commit edcee0ba8e
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

15
contrib/health_check.py Executable file
View 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()