feat: provision private Hermes assistants for authenticated Hope accounts
This commit is contained in:
1 parent
da65da68b3
commit
2aedea84b5
33 files changed
+3063
-1743
No files matched your search
@@ -0,0 +1,21 @@
|
||||
"""Check shell, transport, account service and the actual running speech worker."""
|
||||
import os
|
||||
import ssl
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get(url, *, insecure=False):
|
||||
context = ssl._create_unverified_context() if insecure else None
|
||||
with urllib.request.urlopen(url, timeout=3, context=context) as response:
|
||||
if response.status != 200:
|
||||
raise RuntimeError('Service unavailable')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
get(f"https://127.0.0.1:{os.getenv('WEB_PORT', '9178')}/", insecure=True)
|
||||
get('http://127.0.0.1:7880/')
|
||||
get(os.getenv('CONTROL_URL', 'http://127.0.0.1:8092') + '/health')
|
||||
pid, port = map(int, Path('/tmp/hope-worker-health').read_text().split())
|
||||
os.kill(pid, 0)
|
||||
get(f'http://127.0.0.1:{port}/')
|
||||
Reference in new issue
Block a user