Update consumer.py

This commit is contained in:
shamoon 2024-11-07 10:44:58 -08:00
parent 3a7eee2c2e
commit 85c661dff2
No known key found for this signature in database

View File

@ -150,7 +150,8 @@ class ConsumerPlugin(
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