49 Commits

Author SHA1 Message Date
jonaswinkler
221c1e76e9 couple changes to the consumer. 2020-11-26 18:55:05 +01:00
jonaswinkler
dac7971cd6 Apparently there was a very good reason to use inotify. fixes #46 complete with test cases for inotify and polling. 2020-11-26 17:57:03 +01:00
Jonas Winkler
9c23207b84 workaround for a bug in django-q: task results with too long names would not show up in the result lists. 2020-11-22 13:53:19 +01:00
Jonas Winkler
afc3753e58 code cleanup 2020-11-21 14:03:45 +01:00
Jonas Winkler
5eb5aa6fb6 removed unused code. 2020-11-18 00:54:51 +01:00
Jonas Winkler
24bb8c71c9 Merge branch 'dev' into mail_rework 2020-11-17 00:23:10 +01:00
Jonas Winkler
e30f0b274b added more testing 2020-11-16 23:16:37 +01:00
Jonas Winkler
2119eb4c15 added option for polling 2020-11-16 18:52:13 +01:00
Jonas Winkler
bd04c966c5 first version of the new consumer. 2020-11-16 18:26:54 +01:00
Jonas Winkler
d99b4623f8 first implementation of the mail rework 2020-11-15 23:56:22 +01:00
Jonas Winkler
eb6805e37e code style fixes 2020-11-12 21:09:45 +01:00
Jonas Winkler
1fa2c54932 on_modified not needed for the consumer. 2020-11-12 10:41:47 +01:00
Jonas Winkler
f53a958bc5 fixes #30 2020-11-12 09:30:04 +01:00
Jonas Winkler
6fd73a04b8 updated consumer: now using watchdog 2020-11-01 23:07:54 +01:00
Jonas Winkler
d3af1e8815 unified data folders 2020-10-26 00:35:24 +01:00
Johann Bauer
cea6dcce23 Warn if consume directory contains subdirectories
.
2020-01-04 01:09:54 +01:00
Daniel Quinn
ef0b33e72e Clean up some linter complaints 2018-09-02 20:33:49 +01:00
Daniel Quinn
d1b6e9329f It's exist_ok=, not exists_ok= -- my bad. 2018-05-28 13:08:00 +01:00
Erik Arvstedt
d132e2b9f5 fixup: remove helper fn 'make_dirs' 2018-05-21 00:45:00 +02:00
Erik Arvstedt
3db175dfe2 Add inotify support 2018-05-11 14:14:50 +02:00
Erik Arvstedt
b74b47423d Consumer loop: make sleep duration dynamic
Make the sleep duration dynamic to account for the time spent in
loop_step.
This improves responsiveness when repeatedly consuming newly
arriving docs.

Use float epoch seconds (time.time()) as the time type for
MailFetcher.last_checked to allow for natural time arithmetic.
2018-05-11 14:14:50 +02:00
Erik Arvstedt
aac17670de Refactor: renamings, extract fn 'loop'
Renamings:
loop -> loop_step
delta -> next_mail_time (this variable names a point in time, not a duration)

Extracting the 'loop' fn is a preparation for later commits where a
second type of loop is added.
2018-05-11 14:14:25 +02:00
Erik Arvstedt
f56ec70aad Ensure docs have been unmodified for some time before consuming
Previously, the second mtime check for new files usually happened right
after the first one, which could have caused consumption of docs that
were still being modified.

We're now waiting for at least FILES_MIN_UNMODIFIED_DURATION (0.5s).

This also cleans up the logic by eliminating the consumer.stats attribute
and the weird double call to consumer.run().

Additionally, this a fixes memory leak in consumer.stats where paths could be
added but never removed if the corresponding files disappeared from
the consumer dir before being considered ready.
2018-05-11 14:05:29 +02:00
Erik Arvstedt
9320230100 Refactor: extract fn 'make_dirs' 2018-05-11 14:04:36 +02:00
Daniel Quinn
19209ba5af Run a --oneshot loop twice
This was necessary since the first loop only ever collects file
statistics so that the second run can be sure about "readiness".
2018-03-03 18:43:20 +00:00
Ovv
340855cd87 Help & documentation 2018-03-03 18:43:20 +00:00
Ovv
b10c2c770c style & test 2018-03-03 18:43:20 +00:00
Ovv
d89dbbe537 Configuration cli argument for document_consumer 2018-03-03 18:43:20 +00:00
David Martin
91cebb5567 Fetch emails right at startup instead of waiting for 10 minutes.
Especially when first setting up the configuration for consuming
documents from emails it makes sense to quickly test the changes. Having
to wait for 10 minutes is not acceptable.

There are two ways around it that come to my mind: the simple approach
is to always fetch the emails when Paperless first starts. This way the
fetching of emails can be tested straight away.
The alternative would be to have a configuration option that allows to
set the interval in which emails are checked. The user could then reduce
it to test the setup and increase it again later on. This seems
needlessly complicated though, so fetching at startup it is.
2017-05-21 14:23:46 +10:00
Daniel Quinn
23bd887f16 Consumer loop time is now configurable 2017-01-01 18:41:06 +00:00
Daniel Quinn
30be13ae33 Added system checks to warn people of misconfigurations 2017-01-01 18:39:34 +00:00
Daniel Quinn
8e58406881 pep8 corrections 2016-10-26 09:32:59 +00:00
Daniel Quinn
b92e007e15 Removed log components and introduced signals for tags & correspondents 2016-03-28 11:11:15 +01:00
Daniel Quinn
3b278c3a24 Added an informational log message for consumer start 2016-03-06 17:26:07 +00:00
Daniel Quinn
631aa99d92 No need to pass verbosity around anymore 2016-02-28 00:39:40 +00:00
Daniel Quinn
7843ea5037 Added and implemented a rudimentary logger 2016-02-14 16:09:52 +00:00
Daniel Quinn
3b5d4cdd39 Added some error handling 2016-02-14 01:32:25 +00:00
Daniel Quinn
7aadab23cc Added the Renderable mixin because DRY 2016-02-11 22:05:38 +00:00
Daniel Quinn
48761911b3 Image imports and consumption by mail work 2016-02-06 17:05:36 +00:00
Daniel Quinn
71075a691a The mailconsumer isn't a consumer at all. Best fixt that 2016-02-05 20:15:08 +00:00
Daniel Quinn
a70b40f618 Broke the consumer script into separate files and started on a mail consumer 2016-01-30 01:18:52 +00:00
Daniel Quinn
ace9389e5f #12: Support image documents 2016-01-29 23:18:03 +00:00
Daniel Quinn
0ec63ae1f9 #11: automatic tagging support 2016-01-28 07:23:11 +00:00
Daniel Quinn
65074b4375 Smarter check positions 2016-01-23 03:42:39 +00:00
Daniel Quinn
9e596953a3 pep8 2016-01-23 02:58:03 +00:00
Daniel Quinn
fdb29f739f Added language detection 2016-01-23 02:33:29 +00:00
Daniel Quinn
ec70d05517 Introducing language detection 2016-01-21 12:50:22 -05:00
the01
4c1ff658d2 add language setting for tesseract 2016-01-21 09:24:13 +01:00
Daniel Quinn
17615d43cb Fixed a few consumer bugs and added an exporter
Rename exporter to export and fixt some debugging

Account for files not matching the sender/title pattern

Added a safety note

Wrong regex on the name parser

Renamed the command to something slightly less ambiguous
2016-01-15 18:14:42 +00:00