- 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
26 lines
477 B
Python
26 lines
477 B
Python
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())
|