Fix/memory leak fixes#158
Merged
adammcdonagh merged 5 commits intomainfrom May 9, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #158 +/- ##
==========================================
- Coverage 89.03% 88.99% -0.04%
==========================================
Files 22 22
Lines 2708 2726 +18
==========================================
+ Hits 2411 2426 +15
- Misses 297 300 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and fixes related to memory management, logging, and configurability for batch task handling. The main highlights are the resolution of memory leaks in both batch handlers and the logger, the addition of new environment variables for memory usage logging and polling interval, and corresponding documentation and dependency updates.
Memory management improvements:
src/opentaskpy/taskhandlers/batch.py).src/opentaskpy/otflogging.py). [1] [2] [3] [4]Logging and monitoring enhancements:
OTF_LOG_MEMORY_USAGEenvironment variable to enable logging of RSS memory usage at each batch poll interval (requirespsutil); this aids in diagnosing memory growth in long-running batches (src/opentaskpy/taskhandlers/batch.py,README.md,docs/usage.md,src/opentaskpy/cli/task_run.py). [1] [2] [3] [4] [5]Configurability improvements:
OTF_BATCH_POLL_INTERVALenvironment variable to allow customization of the batch status-check loop interval, with documentation warning against lowering it in production (src/opentaskpy/taskhandlers/batch.py,README.md,docs/usage.md,src/opentaskpy/cli/task_run.py). [1] [2] [3] [4] [5]Dependency and documentation updates:
psutilas an optional development dependency for memory usage logging (pyproject.toml).CI/CD maintenance:
actions/cache@v5for improved caching reliability (.github/workflows/test.yml). [1] [2] [3] [4] [5] [6] [7] [8]