Update consumer.py

This commit is contained in:
shamoon 2024-11-07 10:44:58 -08:00
parent 220267099a
commit 24da26959d
No known key found for this signature in database

View File

@ -176,7 +176,8 @@ class ConsumerPluginMixin:
self.log.error(log_message or message, exc_info=exc_info)
# Move the file to the failed directory
if self.input_doc.original_file.exists():
self.input_doc.original_file.rename(
copy_file_with_basic_stats(
self.input_doc.original_file,
settings.CONSUMPTION_FAILED_DIR / self.input_doc.original_file.name,
)
raise ConsumerError(f"{self.filename}: {log_message or message}") from exception