Added an informational log message for consumer start

This commit is contained in:
Daniel Quinn
2016-03-06 17:26:07 +00:00
parent 2fba41ad75
commit 3b278c3a24
3 changed files with 25 additions and 2 deletions

View File

@@ -1,10 +1,12 @@
import datetime
import logging
import os
import time
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from ...models import Log
from ...consumer import Consumer, ConsumerError
from ...mail import MailFetcher, MailFetcherError
@@ -44,6 +46,13 @@ class Command(BaseCommand):
except FileExistsError:
pass
logging.getLogger(__name__).info(
"Starting document consumer at {}".format(
settings.CONSUMPTION_DIR
),
extra={"component": Log.COMPONENT_CONSUMER}
)
try:
while True:
self.loop()