MerginMaps / MerginMaps/work-packages
Clean the temp_dir on unsuccessful runs of wp_mergin.py
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
The second to last line of code in wp_mergin.py (shutil.rmtree()) only executes if the scripts has run perfectly.
In cases where there have been a crash for whatever reason, the temp_dir doesn't get cleaned.
Having all the code in a try-except, with shutil.rmtree in the finally block could solve this, I think.
Our implementation of mergin-work-packages is that it runs within a Python-daemon indefinitely (when there are crashes, it just restarts), so if the temp_dirs don't get cleaned on unsuccessful runs, our server runs out of space.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open wp_mergin.py and inspect the existing shutil.rmtree() cleanup and the surrounding run flow. Ensure cleanup also occurs when the script crashes, then verify that temporary directories are removed after both successful and unsuccessful runs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100