Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean the temp_dir on unsuccessful runs of wp_mergin.py #37

Open
chris9404 opened this issue Dec 1, 2021 · 0 comments
Open

Clean the temp_dir on unsuccessful runs of wp_mergin.py #37

chris9404 opened this issue Dec 1, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@chris9404
Copy link

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.

@PeterPetrik PeterPetrik added the bug Something isn't working label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants