dtcn / Detection /__main__.py
randydev's picture
_
cd44819 verified
raw
history blame contribute delete
575 Bytes
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")