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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user