X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c2e8051452fa55db096553cbe5ae622fc363d481..5c14b2f1216cf266efd63f4de84e3f83bb99c9ff:/src/picture/tasks.py?ds=sidebyside diff --git a/src/picture/tasks.py b/src/picture/tasks.py index e815f190c..ff9aa1357 100644 --- a/src/picture/tasks.py +++ b/src/picture/tasks.py @@ -4,12 +4,12 @@ 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 -@task +@shared_task 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)) -@task +@shared_task def index_picture(picture_id, picture_info=None, **kwargs): from picture.models import Picture try: