Spaces:
Building
Building
#!/usr/bin/env python3 | |
""" | |
Simple test script to verify daemon functionality | |
""" | |
import asyncio | |
import sys | |
import os | |
# Add project root to Python path | |
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
async def test_daemon_startup(): | |
"""Test that the daemon can start without errors""" | |
try: | |
from worker.daemon import main | |
print("β Daemon imports successful") | |
# Test database initialization | |
from app.database import init_db, close_db | |
print("β Database imports successful") | |
# Test whisper imports | |
from app.utils.whisper_llm import get_whisper_model | |
print("β Whisper imports successful") | |
print("β All imports successful - daemon should work!") | |
return True | |
except ImportError as e: | |
print(f"β Import error: {e}") | |
return False | |
except Exception as e: | |
print(f"β Unexpected error: {e}") | |
return False | |
if __name__ == "__main__": | |
success = asyncio.run(test_daemon_startup()) | |
sys.exit(0 if success else 1) |