Delete corrupted documents

This commit is contained in:
Ruud committed 2014-09-16 22:00:54 +02:00
1 parent 0358378cae
commit 80df57f2b6
3 files changed
+17 -5

No files matched your search

+3 -1
View File
@@ -178,8 +178,10 @@ class MediaPlugin(MediaBase):
continue
yield doc
except RecordNotFound:
except (RecordDeleted, RecordNotFound):
log.debug('Record not found, skipping: %s', ms['_id'])
except (ValueError, EOFError):
fireEvent('database.delete_corrupted', ms.get('_id'), traceback_error = traceback.format_exc(0))
else:
yield ms