From 58de0e41238af277025411ba15ab9266cbfcec3b Mon Sep 17 00:00:00 2001 From: PhilipDeegan Date: Thu, 24 Oct 2024 21:40:59 +0200 Subject: [PATCH] ++ --- phlop/proc.py | 3 +-- phlop/testing/parallel_processor.py | 9 +++++---- sh/lint.sh | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/phlop/proc.py b/phlop/proc.py index 84cd2d8..bef61da 100644 --- a/phlop/proc.py +++ b/phlop/proc.py @@ -9,8 +9,7 @@ from phlop.procs.runtimer import RunTimer -class ProcessNonZeroExitCode(RuntimeError): - ... +class ProcessNonZeroExitCode(RuntimeError): ... def run(cmd, shell=True, capture_output=True, check=False, print_cmd=True, **kwargs): diff --git a/phlop/testing/parallel_processor.py b/phlop/testing/parallel_processor.py index 3be714c..781f094 100644 --- a/phlop/testing/parallel_processor.py +++ b/phlop/testing/parallel_processor.py @@ -9,13 +9,14 @@ from enum import Enum from multiprocessing import Process, Queue, cpu_count +from phlop.logger import getLogger from phlop.proc import run -timeout = 60 # seconds - give chance to interrupt +timeout = 60 * 60 # seconds - give chance to interrupt +logger = getLogger(__name__) -class TestCaseFailure(Exception): - ... +class TestCaseFailure(Exception): ... class LoggingMode(Enum): @@ -114,7 +115,7 @@ def waiter(queue): try: proc = queue.get(timeout=timeout) except Exception: - print("Queue Exception! - no jobs finished - polling") + logger.info("Queue timeout - polling") continue time.sleep(0.01) # don't throttle! diff --git a/sh/lint.sh b/sh/lint.sh index 61cd7fb..9eca5b6 100755 --- a/sh/lint.sh +++ b/sh/lint.sh @@ -7,7 +7,7 @@ set -e PY_FILES=$(find . -name "*.py") -# python3 -m black phlop tests +python3 -m black phlop tests pylint --errors-only phlop tests isort phlop tests python3 -m ruff check phlop tests