mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-08 15:55:31 +01:00
logging before executing pre and post consume scripts
This commit is contained in:
parent
1322aaf4da
commit
4b281ca89d
1 changed files with 8 additions and 0 deletions
|
|
@ -115,6 +115,9 @@ class Consumer(LoggingMixin):
|
||||||
f"Configured pre-consume script "
|
f"Configured pre-consume script "
|
||||||
f"{settings.PRE_CONSUME_SCRIPT} does not exist.")
|
f"{settings.PRE_CONSUME_SCRIPT} does not exist.")
|
||||||
|
|
||||||
|
self.log("info",
|
||||||
|
f"Executing pre-consume script {settings.PRE_CONSUME_SCRIPT}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
Popen((settings.PRE_CONSUME_SCRIPT, self.path)).wait()
|
Popen((settings.PRE_CONSUME_SCRIPT, self.path)).wait()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
@ -135,6 +138,11 @@ class Consumer(LoggingMixin):
|
||||||
f"{settings.POST_CONSUME_SCRIPT} does not exist."
|
f"{settings.POST_CONSUME_SCRIPT} does not exist."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.log(
|
||||||
|
"info",
|
||||||
|
f"Executing post-consume script {settings.POST_CONSUME_SCRIPT}"
|
||||||
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
Popen((
|
Popen((
|
||||||
settings.POST_CONSUME_SCRIPT,
|
settings.POST_CONSUME_SCRIPT,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue