mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-01 18:37:42 -05:00
Added the Renderable mixin because DRY
This commit is contained in:
@@ -7,9 +7,10 @@ from django.core.management.base import BaseCommand, CommandError
|
||||
|
||||
from ...consumer import Consumer, ConsumerError
|
||||
from ...mail import MailFetcher, MailFetcherError
|
||||
from ...mixins import Renderable
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
class Command(Renderable, BaseCommand):
|
||||
"""
|
||||
On every iteration of an infinite loop, consume what we can from the
|
||||
consumption directory, and fetch any mail available.
|
||||
@@ -62,7 +63,3 @@ class Command(BaseCommand):
|
||||
delta = self.mail_fetcher.last_checked + self.MAIL_DELTA
|
||||
if delta > datetime.datetime.now():
|
||||
self.mail_fetcher.pull()
|
||||
|
||||
def _render(self, text, verbosity):
|
||||
if self.verbosity >= verbosity:
|
||||
print(text)
|
||||
|
Reference in New Issue
Block a user