mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-10 00:35:30 +01:00
a test that "verifies" that the file renaming lock works and no inconsistencies are created.
This commit is contained in:
parent
e428a8a008
commit
550a74347c
2 changed files with 48 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue