diff options
-rw-r--r-- | example_project/celery_app.py.sample | 7 | ||||
-rwxr-xr-x | install/ishtar-prepare-instance | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/example_project/celery_app.py.sample b/example_project/celery_app.py.sample index 3aed98038..23c050732 100644 --- a/example_project/celery_app.py.sample +++ b/example_project/celery_app.py.sample @@ -10,9 +10,4 @@ os.environ.setdefault('DJANGO_SETTINGS_MODULE', project_name + '.settings') app = Celery(project_name) app.config_from_object('django.conf:settings', namespace='CELERY') -app.autodiscover_tasks() - - -@app.task(bind=True) -def debug_task(self): - print('Request: {0!r}'.format(self.request))
\ No newline at end of file +app.autodiscover_tasks()
\ No newline at end of file diff --git a/install/ishtar-prepare-instance b/install/ishtar-prepare-instance index 50740b1b5..4ce36fae9 100755 --- a/install/ishtar-prepare-instance +++ b/install/ishtar-prepare-instance @@ -276,6 +276,9 @@ EOF s|#INSTALL_PATH#|$INSTALL_PATH|g;"\ "install/celery.service.template" > \ "/etc/systemd/system/celery-"$INSTANCE".service" + sed -s "s|example_project|$INSTANCE|g;" \ + $INSTANCE"/celery_app.py.sample" > \ + $INSTANCE"/celery_app.py" systemctl daemon-reload fi @@ -285,6 +288,7 @@ EOF ln -s __init__.py.celery.sample __init__.py else ln -s __init__.py.base.sample __init__.py + fi cd - |