Merge pull request #3310 from omChauhanDev/fix-task-manager
fix: preserve asyncio.Task return value in create_task
This commit is contained in:
@@ -157,7 +157,7 @@ class TaskManager(BaseTaskManager):
|
|||||||
|
|
||||||
async def run_coroutine():
|
async def run_coroutine():
|
||||||
try:
|
try:
|
||||||
await coroutine
|
return await coroutine
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
logger.trace(f"{name}: task cancelled")
|
logger.trace(f"{name}: task cancelled")
|
||||||
# Re-raise the exception to ensure the task is cancelled.
|
# Re-raise the exception to ensure the task is cancelled.
|
||||||
|
|||||||
Reference in New Issue
Block a user