operations-granite/HuggingFace-Granite-AI-Practice-Agent-Dev
0
1#!/usr/bin/env python32import sys, os3sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'backend'))4 5import asyncio6from database.db_manager import DatabaseManager7 8async def main():9 db = DatabaseManager()10 async with db.get_connection() as conn:11 # Check for cache tables12 tables = await conn.fetch("""13 SELECT table_name FROM information_schema.tables14 WHERE table_name LIKE 'zoho_%_cache'15 """)16 17 print("๐ Zoho cache tables:")18 if tables:19 for t in tables:20 table = t['table_name']21 count = await conn.fetchval(f"SELECT COUNT(*) FROM {table}")22 print(f" {table}: {count} records")23 else:24 print(" โ No cache tables found!")25 print("\n Missing tables:")26 print(" - zoho_accounts_cache")27 print(" - zoho_contacts_cache")28 print(" - zoho_deals_cache")29 30asyncio.run(main())31 