FA3-Datafetch/backend/debug_settings.py
2026-01-13 14:49:36 +08:00

25 lines
612 B
Python

import asyncio
import sys
import os
# Add backend to path
sys.path.append('/Users/xucheng/git.qubit.ltd/FA3/backend')
from app.legacy.database_old import AsyncSessionLocal
from app.legacy.models_old import Setting
from sqlalchemy import select
async def main():
async with AsyncSessionLocal() as session:
result = await session.execute(select(Setting))
settings = result.scalars().all()
for s in settings:
print(f"Key: {s.key}, Value: {s.value}")
if __name__ == "__main__":
try:
asyncio.run(main())
except Exception as e:
print(f"Error: {e}")