Add subcription feature 3

This commit is contained in:
Urtzi Alfaro
2026-01-15 20:45:49 +01:00
parent a4c3b7da3f
commit b674708a4c
83 changed files with 9451 additions and 6828 deletions

View File

@@ -87,7 +87,7 @@ async def get_db_health() -> bool:
return True
except Exception as e:
logger.error("Database health check failed", error=str(e))
logger.error(f"Database health check failed: {str(e)}")
return False
async def create_tables():
@@ -173,7 +173,7 @@ class AuthDatabaseUtils:
}
except Exception as e:
logger.error("Failed to get auth statistics", error=str(e))
logger.error(f"Failed to get auth statistics: {str(e)}")
return {
"active_users": 0,
"inactive_users": 0,
@@ -234,7 +234,7 @@ async def get_db_session() -> AsyncGenerator[AsyncSession, None]:
logger.debug("Database session created")
yield session
except Exception as e:
logger.error("Database session error", error=str(e), exc_info=True)
logger.error(f"Database session error: {str(e)}", exc_info=True)
await session.rollback()
raise
finally:
@@ -257,7 +257,7 @@ async def initialize_auth_database():
logger.info("Auth service database initialized successfully")
except Exception as e:
logger.error("Failed to initialize auth service database", error=str(e))
logger.error(f"Failed to initialize auth service database: {str(e)}")
raise
# Database cleanup for auth service
@@ -273,7 +273,7 @@ async def cleanup_auth_database():
logger.info("Auth service database cleanup completed")
except Exception as e:
logger.error("Failed to cleanup auth service database", error=str(e))
logger.error(f"Failed to cleanup auth service database: {str(e)}")
# Export the commonly used items to maintain compatibility
__all__ = [