Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
add example documentation for inotify_wait_modified_delay
Browse files Browse the repository at this point in the history
and add config to ansible role
  • Loading branch information
s4nf4n committed Feb 13, 2022
1 parent ed29f42 commit 27932ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ paperlessng_tika_gotenberg_endpoint: http://localhost:3000
# Software tweaks
paperlessng_time_zone: Europe/Berlin
paperlessng_consumer_polling: 0
paperlessng_consumer_inotify_wait_modified_delay: 0.1
paperlessng_consumer_delete_duplicates: False
paperlessng_consumer_recursive: False
paperlessng_consumer_subdirs_as_tags: False
Expand Down
2 changes: 2 additions & 0 deletions ansible/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@
line: "PAPERLESS_TIME_ZONE={{ paperlessng_time_zone }}"
- regexp: PAPERLESS_CONSUMER_POLLING
line: "PAPERLESS_CONSUMER_POLLING={{ paperlessng_consumer_polling }}"
- regexp: PAPERLESS_CONSUMER_INOTIFY_WAIT_MODIFIED_DELAY
line: "PAPERLESS_CONSUMER_INOTIFY_WAIT_MODIFIED_DELAY={{ paperlessng_consumer_inotify_wait_modified_delay }}"
- regexp: PAPERLESS_CONSUMER_DELETE_DUPLICATES
line: "PAPERLESS_CONSUMER_DELETE_DUPLICATES={{ paperlessng_consumer_delete_duplicates }}"
- regexp: PAPERLESS_CONSUMER_RECURSIVE
Expand Down
7 changes: 7 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,13 @@ PAPERLESS_CONSUMER_POLLING=<num>

Defaults to 0, which disables polling and uses filesystem notifications.

PAPERLESS_CONSUMER_INOTIFY_WAIT_MODIFIED_DELAY=<float>
If paperless consumes a file and get a "finished" event with ``inotify``,
the file might get picked up by the scanner again to write additional content.
Specify a wait delay in seconds here to make paperless wait for changes to the file
so that it can continue consuming that same file.

Defaults to 0.1, waiting for 100 milliseconds.

PAPERLESS_CONSUMER_DELETE_DUPLICATES=<bool>
When the consumer detects a duplicate document, it will not touch the
Expand Down
1 change: 1 addition & 0 deletions paperless.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#PAPERLESS_THREADS_PER_WORKER=1
#PAPERLESS_TIME_ZONE=UTC
#PAPERLESS_CONSUMER_POLLING=10
#PAPERLESS_CONSUMER_INOTIFY_WAIT_MODIFIED_DELAY=0.1
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
#PAPERLESS_CONSUMER_RECURSIVE=false
#PAPERLESS_CONSUMER_IGNORE_PATTERNS=[".DS_STORE/*", "._*", ".stfolder/*"]
Expand Down

0 comments on commit 27932ea

Please sign in to comment.