32 lines
731 B
Python
32 lines
731 B
Python
|
|
#!/usr/bin/env python3
|
||
|
|
"""
|
||
|
|
Test script for subscription invoice processing
|
||
|
|
Run this manually to test the subscription processing job
|
||
|
|
"""
|
||
|
|
import asyncio
|
||
|
|
import sys
|
||
|
|
import os
|
||
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||
|
|
|
||
|
|
from app.core.database import init_db
|
||
|
|
from app.jobs.process_subscriptions import process_subscriptions
|
||
|
|
|
||
|
|
|
||
|
|
async def main():
|
||
|
|
"""Run subscription processing test"""
|
||
|
|
print("🧪 Testing subscription invoice processing...")
|
||
|
|
print("=" * 60)
|
||
|
|
|
||
|
|
# Initialize database connection pool
|
||
|
|
init_db()
|
||
|
|
print("✅ Database initialized")
|
||
|
|
|
||
|
|
await process_subscriptions()
|
||
|
|
|
||
|
|
print("=" * 60)
|
||
|
|
print("✅ Test complete")
|
||
|
|
|
||
|
|
|
||
|
|
if __name__ == "__main__":
|
||
|
|
asyncio.run(main())
|