mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-25 00:58:56 +00:00
add pre-consume hook
a script hook can be defined in /etc/paperless.conf as PAPERLESS_PRE_CONSUME_SCRIPT
This commit is contained in:
1 parent
7b88cea07b
commit
c728b1dd21
3 files changed
+17
-3
No files matched your search
@@ -8,11 +8,14 @@ class DocumentsConfig(AppConfig):
|
||||
def ready(self):
|
||||
|
||||
from .signals import document_consumption_finished
|
||||
from .signals import document_consumption_started
|
||||
from .signals.handlers import (
|
||||
set_correspondent, set_tags, run_external_script)
|
||||
set_correspondent, set_tags, run_post_consume_external_script, run_pre_consume_external_script)
|
||||
|
||||
document_consumption_finished.connect(set_tags)
|
||||
document_consumption_finished.connect(set_correspondent)
|
||||
document_consumption_finished.connect(run_external_script)
|
||||
document_consumption_finished.connect(run_post_consume_external_script)
|
||||
|
||||
document_consumption_started.connect(run_pre_consume_external_script)
|
||||
|
||||
AppConfig.ready(self)
|
||||
Reference in new issue
Block a user