Skip to content

Commit 11ec058

Browse files
committed
debug: show more messages for debug
1 parent 697d65f commit 11ec058

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ jobs:
5858
${{ matrix.platform.python_exec }} -m mypy python
5959
- name: Python tests
6060
run: |
61-
${{ matrix.platform.python_exec }} -m pytest python/cocoindex/tests
61+
${{ matrix.platform.python_exec }} -m pytest --capture=no python/cocoindex/tests

python/cocoindex/subprocess_exec.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,17 @@
4040
def _shutdown_pool_at_exit() -> None:
4141
"""Best-effort shutdown of the global ProcessPoolExecutor on interpreter exit."""
4242
global _pool, _pool_cleanup_registered # pylint: disable=global-statement
43+
print("Shutting down pool at exit")
4344
with _pool_lock:
4445
if _pool is not None:
4546
try:
47+
print("Before shutdown")
4648
_pool.shutdown(wait=True, cancel_futures=True)
47-
except Exception:
48-
_logger.debug(
49-
"Error during ProcessPoolExecutor shutdown at exit",
49+
print("After shutdown")
50+
except Exception as e:
51+
_logger.error(
52+
"Error during ProcessPoolExecutor shutdown at exit: %s",
53+
e,
5054
exc_info=True,
5155
)
5256
finally:

0 commit comments

Comments
 (0)