Move reranker to Serenity, add monitoring and mesh-mqtt-observer stacks
- ai: remove reranker service (moved to Serenity at 10.5.1.5:9787) - ai: add LiteLLM reranker proxy entry for Serenity - ai: configure OpenWebUI to use LiteLLM for reranking - monitoring: add Grafana + Prometheus stack - mesh-mqtt-observer: add new service - automation, documents, meshtastic: misc updates
This commit is contained in:
25
mesh-mqtt-observer/app/healthcheck.py
Normal file
25
mesh-mqtt-observer/app/healthcheck.py
Normal file
@@ -0,0 +1,25 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
import psycopg
|
||||
|
||||
|
||||
def main() -> int:
|
||||
dsn = os.getenv("DATABASE_URL")
|
||||
if not dsn:
|
||||
print("DATABASE_URL missing")
|
||||
return 1
|
||||
|
||||
try:
|
||||
with psycopg.connect(dsn, autocommit=True) as conn:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("SELECT 1")
|
||||
cur.fetchone()
|
||||
return 0
|
||||
except Exception as exc:
|
||||
print(exc)
|
||||
return 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user