From effeca76f838c19cea82d12fba78910bd51fcb37 Mon Sep 17 00:00:00 2001 From: Imran Ariffin Date: Fri, 21 Jul 2023 08:52:42 -0400 Subject: [PATCH] (#28) Ensure sigterm is handled by coverage This way, coverage can collect data before process termination --- .coveragerc | 1 + src/aiotaskq/worker.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.coveragerc b/.coveragerc index 0f4f69f..2d31e33 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,3 +2,4 @@ source = src/ parallel = True concurrency = multiprocessing +sigterm = True diff --git a/src/aiotaskq/worker.py b/src/aiotaskq/worker.py index f84b393..e1e7f76 100755 --- a/src/aiotaskq/worker.py +++ b/src/aiotaskq/worker.py @@ -19,7 +19,7 @@ from .interfaces import ConcurrencyType, IConcurrencyManager, IPubSub from .pubsub import PubSub -if t.TYPE_CHECKING: +if t.TYPE_CHECKING: # pragma: no cover from .task import Task logging.basicConfig(level=logging.INFO)