fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix in librarian
[wolnelektury.git]
/
apps
/
catalogue
/
tasks.py
diff --git
a/apps/catalogue/tasks.py
b/apps/catalogue/tasks.py
index
e392ae2
..
a2b8be0
100644
(file)
--- 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 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
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):
# 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
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,
if not DefaultStorage().exists(file_name):
kwargs = {
'cover': True,