From: Radek Czajka Date: Wed, 1 Oct 2014 08:51:37 +0000 (+0200) Subject: Book.flush_includes after ebook generation. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/0950e2b491433f1b54a0c16563a885394d9f83d6 Book.flush_includes after ebook generation. --- diff --git a/apps/catalogue/fields.py b/apps/catalogue/fields.py index 884ecef8d..590f2657d 100644 --- a/apps/catalogue/fields.py +++ b/apps/catalogue/fields.py @@ -82,7 +82,9 @@ class BuildEbook(Task): def run(self, obj, field_name): """Just run `build` on FieldFile, can't pass it directly to Celery.""" - return self.build(getattr(obj, field_name)) + ret = self.build(getattr(obj, field_name)) + obj.flush_includes() + return ret def build(self, fieldfile): book = fieldfile.instance diff --git a/fabfile.py b/fabfile.py index 77652e1ee..a7bc768ab 100644 --- a/fabfile.py +++ b/fabfile.py @@ -14,8 +14,8 @@ def production(): env.user = 'lektury' env.app_path = '/srv/wolnelektury.pl' env.services = [ - Supervisord('wolnelektury.gunicorn'), - Supervisord('celery.wolnelektury:'), + Supervisord('wolnelektury'), + Supervisord('wolnelektury.celery'), ]