X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/67905ab03cb741371bd13c4f6775544b93388b3c..531ad4bc4cab82f8c5dc3569c3835328df892a83:/apps/catalogue/tasks.py diff --git a/apps/catalogue/tasks.py b/apps/catalogue/tasks.py old mode 100755 new mode 100644 index cf6178939..8906a141c --- a/apps/catalogue/tasks.py +++ b/apps/catalogue/tasks.py @@ -18,11 +18,16 @@ def touch_tag(tag): type(tag).objects.filter(pk=tag.pk).update(**update_dict) +@task(ignore_result=True) +def fix_tree_tags(book): + book.fix_tree_tags() + + @task -def index_book(book_id, book_info=None): +def index_book(book_id, book_info=None, **kwargs): from catalogue.models import Book try: - return Book.objects.get(id=book_id).search_index(book_info) + return Book.objects.get(id=book_id).search_index(book_info, **kwargs) except Exception, e: print "Exception during index: %s" % e print_exc()