refactor: simplify database logging handler

- Remove retry logic from DatabaseLogHandler (was for SQLite locking)
- Streamline error handling in log emission
- Clean up platform health service

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-13 20:37:34 +01:00
parent 7a7b612519
commit 44832b3fc9
3 changed files with 61 additions and 88 deletions

View File

@@ -47,9 +47,12 @@ def check_database_ready():
"""Check if database is ready (migrations have been run)."""
try:
with engine.connect() as conn:
# Try to query a table that should exist
# Check for tables in the public schema (PostgreSQL)
result = conn.execute(
text("SELECT name FROM sqlite_master WHERE type='table' LIMIT 1")
text(
"SELECT tablename FROM pg_catalog.pg_tables "
"WHERE schemaname = 'public' LIMIT 1"
)
)
tables = result.fetchall()
return len(tables) > 0