fix: additional podcast service updates
This commit is contained in:
@@ -431,7 +431,7 @@ class LimitValidator:
|
||||
self.db.refresh(usage)
|
||||
except Exception as query_err:
|
||||
error_str = str(query_err).lower()
|
||||
if 'no such column' in error_str and 'exa_calls' in error_str:
|
||||
if 'no such column' in error_str and ('exa_calls' in error_str or 'wavespeed' in error_str):
|
||||
logger.warning("Missing column detected in usage query, fixing schema and retrying...")
|
||||
import sqlite3
|
||||
import services.subscription.schema_utils as schema_utils
|
||||
|
||||
@@ -88,6 +88,9 @@ def ensure_usage_summaries_columns(db: Session) -> None:
|
||||
"image_edit_cost": "REAL DEFAULT 0.0",
|
||||
"audio_calls": "INTEGER DEFAULT 0",
|
||||
"audio_cost": "REAL DEFAULT 0.0",
|
||||
"wavespeed_calls": "INTEGER DEFAULT 0",
|
||||
"wavespeed_tokens": "INTEGER DEFAULT 0",
|
||||
"wavespeed_cost": "REAL DEFAULT 0.0",
|
||||
}
|
||||
|
||||
for col_name, ddl in required_columns.items():
|
||||
|
||||
Reference in New Issue
Block a user