fix: asyncio: Task was destroyed but it is pending
All checks were successful
Build Worker Base and Application Images / check-base-changes (push) Successful in 8s
Build Worker Base and Application Images / build-base (push) Has been skipped
Build Worker Base and Application Images / build-docker (push) Successful in 2m48s
Build Worker Base and Application Images / deploy-stack (push) Successful in 18s

This commit is contained in:
ziesorx 2025-09-25 01:50:04 +07:00
parent 5065e43837
commit b8de5e191e
2 changed files with 16 additions and 10 deletions

View file

@ -1108,6 +1108,8 @@ class DetectionPipeline:
self.branch_processor.cleanup()
if self.license_plate_manager:
asyncio.create_task(self.license_plate_manager.close())
# Schedule cleanup task and track it to prevent warnings
cleanup_task = asyncio.create_task(self.license_plate_manager.close())
cleanup_task.add_done_callback(lambda _: None) # Suppress "Task exception was never retrieved"
logger.info("Detection pipeline cleaned up")