This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
config option for setting delay waiting for modified files while using inotify #1572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I bought a Canon GX7050 last year and setup paperless-ng shortly after.
It has Duplex ADF but behaves a little weird, when scanning multiple pages at once:
I did not want to move to polling, as this still could poll just in the right moment when the file is between pages.
So with this feature I extended the consumer to wait for the file to remain unmodified for a configurable time CONSUMER_INOTIFY_WAIT_MODIFIED_DELAY after IN_CLOSE_WRITE event by starting a new inofify watch.
This defaults to 100ms, because new tests failed with github actions, when set lower. Actually this could be lowered for normal consumption but still kind of makes the consumption more robust.
For my use case I would raise this option to about 5s.