- result = create_zip_task.delay(paths, settings.ALL_EPUB_ZIP)
- return settings.MEDIA_URL + result.wait()
+ if settings.USE_CELERY:
+ result = create_zip_task.delay(paths, settings.ALL_EPUB_ZIP)
+ return result.wait()
+ else:
+ result = create_zip_task(paths, settings.ALL_EPUB_ZIP)
+ return result