mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-01 01:46:16 +00:00
a test that "verifies" that the file renaming lock works and no inconsistencies are created.
This commit is contained in:
@@ -206,6 +206,8 @@ class Consumer(LoggingMixin):
|
||||
document.archive_checksum = hashlib.md5(
|
||||
f.read()).hexdigest()
|
||||
|
||||
# Don't save with the lock active. Saving will cause the file
|
||||
# renaming logic to aquire the lock as well.
|
||||
document.save()
|
||||
|
||||
# Delete the file only if it was successfully consumed
|
||||
|
Reference in New Issue
Block a user