mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Added and implemented a rudimentary logger
This commit is contained in:
@@ -7,10 +7,9 @@ from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from ...consumer import Consumer, ConsumerError
|
||||
from ...mail import MailFetcher, MailFetcherError
|
||||
from ...mixins import Renderable
|
||||
|
||||
|
||||
class Command(Renderable, BaseCommand):
|
||||
class Command(BaseCommand):
|
||||
"""
|
||||
On every iteration of an infinite loop, consume what we can from the
|
||||
consumption directory, and fetch any mail available.
|
||||
|
@@ -46,7 +46,7 @@ class Command(Renderable, BaseCommand):
|
||||
|
||||
target = os.path.join(self.target, document.parseable_file_name)
|
||||
|
||||
self._render("Exporting: {}".format(target), 1)
|
||||
print("Exporting: {}".format(target))
|
||||
|
||||
with open(target, "wb") as f:
|
||||
f.write(GnuPG.decrypted(document.source_file))
|
||||
|
@@ -27,6 +27,5 @@ class Command(Renderable, BaseCommand):
|
||||
pk__in=document.tags.values_list("pk", flat=True))
|
||||
for tag in tags:
|
||||
if tag.matches(document.content):
|
||||
self._render(
|
||||
'Tagging {} with "{}"'.format(document, tag), 1)
|
||||
print('Tagging {} with "{}"'.format(document, tag))
|
||||
document.tags.add(tag)
|
||||
|
Reference in New Issue
Block a user