feat: add migrations, test scripts, and utility tools
- Add database migrations (006-028) for face recognition, identity, file_uuid - Add test scripts for ASR, face, search, processing - Add portal frontend (Tauri) - Add config, benchmark, and monitoring utilities - Add model checkpoints and pretrained model references
This commit is contained in:
38
test_retry_logic.py
Normal file
38
test_retry_logic.py
Normal file
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Test that the modified asr_processor.py imports correctly and has retry logic.
|
||||
"""
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Add scripts directory to path
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "scripts"))
|
||||
|
||||
try:
|
||||
from asr_processor import run_asr, save_checkpoint, load_checkpoint
|
||||
|
||||
print("✅ Import successful")
|
||||
print(f"run_asr function: {run_asr}")
|
||||
print(f"save_checkpoint function: {save_checkpoint}")
|
||||
print(f"load_checkpoint function: {load_checkpoint}")
|
||||
|
||||
# Check if retry logic is in the file
|
||||
with open("scripts/asr_processor.py", "r") as f:
|
||||
content = f.read()
|
||||
|
||||
if "max_retries = 3" in content:
|
||||
print("✅ Retry logic found in code")
|
||||
else:
|
||||
print("❌ Retry logic not found")
|
||||
|
||||
if "save_checkpoint" in content:
|
||||
print("✅ Checkpoint functions found")
|
||||
else:
|
||||
print("❌ Checkpoint functions not found")
|
||||
|
||||
except ImportError as e:
|
||||
print(f"❌ Import failed: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
print("\n✅ Test completed successfully")
|
||||
Reference in New Issue
Block a user