<Future pending> issue fix was incorrect. Reverting

This commit is contained in:
Aravind Karnam
2024-11-26 17:04:04 +05:30
parent a888c91790
commit 155c756238
3 changed files with 4 additions and 8 deletions

View File

@@ -125,8 +125,7 @@ class TaskManager:
self.cleanup_task = None
async def start(self):
loop = asyncio.get_event_loop()
self.cleanup_task = loop.create_task(self._cleanup_loop())
self.cleanup_task = asyncio.create_task(self._cleanup_loop())
async def stop(self):
if self.cleanup_task:
@@ -232,8 +231,7 @@ class CrawlerService:
async def start(self):
await self.task_manager.start()
loop = asyncio.get_event_loop()
self._processing_task = loop.create_task(self._process_queue())
self._processing_task = asyncio.create_task(self._process_queue())
async def stop(self):
if self._processing_task: