Opened 12 years ago
Last modified 9 years ago
#612 new defect
MediaFile deletion bails on with missing files on cloudfiles
Reported by: | spaetz | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | programming | Keywords: | |
Cc: | Parent Tickets: |
Description
MediaEntry.delete does this:
try: delete_media_files(self) except OSError, error:
joar says that the cloudfiles plugin raises a different exception when files are missing (somthing that is an IOError subclass).
So the very least we need to do here, is to also catch IOError and make them non-fatal.
Even better, if we could make the file deletion be celery tasks. In this case we would get automatic retries in case of failures (with separate-process celery) even after some waiting time.
It looks like a way to fix this would be for mediagoblin/storage/cloudfiles.py to remap the cloudfile error condition indicating that a file does not exist into OSError for the benefit of MediaEntry.delete.