From 0950e2b491433f1b54a0c16563a885394d9f83d6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 1 Oct 2014 10:51:37 +0200 Subject: [PATCH] Book.flush_includes after ebook generation. --- apps/catalogue/fields.py | 4 +++- fabfile.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) 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'), ] -- 2.20.1