File size: 575 Bytes
cd44819 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import logging
from .utils import DetectionManager
if __name__ == "__main__":
manager = DetectionManager()
try:
manager.loop.run_until_complete(manager.run())
except KeyboardInterrupt:
logging.info("π Shutdown requested by user")
except Exception as e:
logging.critical(f"π΄ Startup failed: {e}", exc_info=True)
finally:
if manager.loop.is_running():
manager.loop.run_until_complete(manager.loop.shutdown_asyncgens())
manager.loop.close()
logging.info("π΄ Detection Manager stopped") |