Skip to content

Conversation

@VictorHarbo
Copy link
Contributor

This pull request introduces some minor improvements to database session handling and filename sanitation.
The changes focus on ensuring resources are properly closed to prevent leaks. Also, filename sanitation is improved to handle more special characters as we have encountered errors with question marks for instance. The work has been done by @jorntx and I.

Database session management and error handling:

  • Added commit/rollback logic and verbose logging to Database.close() in db.py, ensuring all pending transactions are handled and sessions are properly closed
  • Improved atomic row claiming and error handling in Snapshot.py when fetching and modifying snapshot records
  • Ensured that any created collection in the main workflow is closed cleanly, preventing resource leaks
  • Added a close() method to Worker.py to properly close database and HTTP connections with logging and error suppression

Filename and path sanitization:

  • Extended the list of disallowed/special characters in filename and path sanitization functions to prevent filesystem issues across platforms

jorntx and others added 6 commits January 9, 2026 15:40
@bitdruid bitdruid self-requested a review January 20, 2026 16:03
@bitdruid
Copy link
Owner

thank you i will check this out when ive enough time. meanwhile what are your thoughts about changes to the db into a single file (one table per request OR optional define a /etc/pywaybackup/config.yml for useing an existing sql / psql db)? id like to make this project more integratable into persistent infrastructures. currently im a bit playing around with a very simple flask ui. thats why i started implementing module functionality...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants