fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix findable
[wolnelektury.git]
/
src
/
picture
/
tasks.py
diff --git
a/src/picture/tasks.py
b/src/picture/tasks.py
index
e815f19
..
ff9aa13
100644
(file)
--- a/
src/picture/tasks.py
+++ b/
src/picture/tasks.py
@@
-4,12
+4,12
@@
import json
from traceback import print_exc
import json
from traceback import print_exc
-from celery
.task import
task
+from celery
import shared_
task
from django.core.files.base import ContentFile
from django.template.loader import render_to_string
from django.core.files.base import ContentFile
from django.template.loader import render_to_string
-@task
+@
shared_
task
def generate_picture_html(picture_id):
import picture.models
pic = picture.models.Picture.objects.get(pk=picture_id)
def generate_picture_html(picture_id):
import picture.models
pic = picture.models.Picture.objects.get(pk=picture_id)
@@
-22,7
+22,7
@@
def generate_picture_html(picture_id):
pic.html_file.save("%s.html" % pic.slug, ContentFile(html_text))
pic.html_file.save("%s.html" % pic.slug, ContentFile(html_text))
-@task
+@
shared_
task
def index_picture(picture_id, picture_info=None, **kwargs):
from picture.models import Picture
try:
def index_picture(picture_id, picture_info=None, **kwargs):
from picture.models import Picture
try: