Task #2683
closedhandle working directories in base PulpTask
0%
Description
Creation and cleanup of `working_dir` should owned by the `PulpTask` class [0]. Creation of a new `working_dir` should occur on `PulpTask.__call__()` and cleanup should occur on `PulpTask.on_success()` and `PulpTask.on_failure()`.
`PulpTask`'s child, `UserFacingTask` will need to be updated to use super() to pick up this functionality.
[0] - https://github.com/pulp/pulp/blob/3.0-dev/tasking/pulp/tasking/tasks.py#L28
Updated by bmbouter over 7 years ago
While working on sync() it was determined that very few tasks actually need working directories and it would be inefficient to have them created/deleted with every Task (which is what this issue is for). It probably is only sync() and publish(). Since those stories include the working dir create+delete we should close this as WONTFIX.
I'm waiting for another dev who agrees to actually close it.
Updated by amacdona@redhat.com over 7 years ago
- Status changed from NEW to CLOSED - NOTABUG
Agreed. This work is now done by this context manager:
https://github.com/pulp/pulp/blob/8401606b530f6fb712b98fc0359d41a3cb560069/platform/pulp/tasking/services/storage.py#L142
Too bad we don't have a CLOSED-IRRELEVANT :)