X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/aae8a623a8d2fbc6edf6cfc5f070c161084f37be..0e79f07515678e3e678c3637124a27cb81ee8a94:/apps/catalogue/tasks.py?ds=sidebyside diff --git a/apps/catalogue/tasks.py b/apps/catalogue/tasks.py index e392ae2da..a2b8be088 100644 --- a/apps/catalogue/tasks.py +++ b/apps/catalogue/tasks.py @@ -5,10 +5,13 @@ from datetime import datetime from traceback import print_exc from celery.task import task +from celery.utils.log import get_task_logger from django.conf import settings from wolnelektury.utils import localtime_to_utc from waiter.models import WaitedFile +task_logger = get_task_logger(__name__) + # TODO: move to model? def touch_tag(tag): @@ -38,7 +41,7 @@ def build_custom_pdf(book_id, customizations, file_name, waiter_id=None): from django.core.files.storage import DefaultStorage from catalogue.models import Book - print "will gen %s" % DefaultStorage().path(file_name) + task_logger.info(DefaultStorage().path(file_name)) if not DefaultStorage().exists(file_name): kwargs = { 'cover': True,