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

Persist successful uploads to disk immediately #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mherdeg
Copy link

@mherdeg mherdeg commented Nov 17, 2013

When uploading a large number of files (and fully expecting this process to die/fail before it finishes uploading all of them), it can be frustrating that the list of successfully uploaded files is stored only in an in-memory shelf object and is persisted only after an attempt to upload every file, in the call to self.uploaded.close().

This diff adds a call to self.uploaded.sync() on every logUpload(), which makes it much faster to fix in tangible form a copy of the fact that a file was uploaded successfully.

When uploading a large number of files (and fully expecting this process to die/fail before it finishes uploading all of them), it can be frustrating that the list of successfully uploaded files is stored only in an in-memory shelf object and is persisted only after an attempt to upload every file, in the call to self.uploaded.close().

This diff adds a call to self.uploaded.sync() on every logUpload(), which makes it much faster to fix in tangible form a copy of the fact that a file was uploaded successfully.
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.

1 participant