From 69984765b3d97e5524e3e2c22ddae1942513094a Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Wed, 11 Dec 2019 00:44:58 +0000 Subject: [PATCH] Fix taskType typo silencing cancellation warnings --- qwarc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qwarc/__init__.py b/qwarc/__init__.py index 968b351..7f660bc 100644 --- a/qwarc/__init__.py +++ b/qwarc/__init__.py @@ -220,7 +220,7 @@ class QWARC: except concurrent.futures.CancelledError as e: # Got cancelled, nothing we can do about it, but let's log a warning if it's a process task if isinstance(future, asyncio.Task): - if future.taskType == 'process_item': + if future.taskType == 'process': logging.warning(f'Task for {future.itemType}:{future.itemValue} cancelled: {future!r}') elif future.taskType == 'sleep': self._sleepTasks.remove(future)