result = create_zip.delay(paths, "%s_%s" % (self.slug, format_))
return result.wait()
- def search_index(self, book_info=None):
- if hasattr(settings, 'CELERY_ALWAYS_EAGER') and settings.CELERY_ALWAYS_EAGER:
+ def search_index(self, book_info=None, reuse_index=False):
+ if reuse_index:
idx = search.ReusableIndex()
else:
idx = search.Index()
book.build_mobi()
if not settings.NO_SEARCH_INDEX and search_index:
- index_book.delay(book.id, book_info)
+ book.search_index()
+ #index_book.delay(book.id, book_info)
book_descendants = list(book.children.all())
descendants_tags = set()