bmc_hub/run_anydesk_import.py
Christian bc504b9257 feat: Add subscription management functionality and AnyDesk API integration
- Implemented subscription creation, updating, and rendering in script_9.js.
- Added functions for handling subscription line items, product selection, and total calculations.
- Integrated AnyDesk API for session management in test_anydesk.py.
- Created REST client test requests for API endpoints in api.http.
- Developed a script to check ESET machine status and save details in tmp_check_eset_machine.py.
2026-03-30 07:50:15 +02:00

16 lines
556 B
Python

"""Run AnyDesk session import directly (bypasses HTTP auth)"""
import asyncio, sys, os
sys.path.insert(0, os.path.dirname(__file__))
os.environ.setdefault("DATABASE_URL", "postgresql://bmc_hub:bmc_hub@localhost:5433/bmc_hub")
from app.services.anydesk import AnyDeskService
async def main():
svc = AnyDeskService()
print("Credentials:", svc._get_credentials())
print("\nFetching sessions (last 30 days, up to 1000)...")
result = await svc.fetch_sessions_from_api(days=30, limit=1000)
print(f"\nResult: {result}")
asyncio.run(main())