Skip to content

Commit

Permalink
updates to the worker entry in docker compose, celery config now spec…
Browse files Browse the repository at this point in the history
…ifies django orm as backend
  • Loading branch information
rwblair committed Jan 14, 2016
1 parent de2a4fd commit ccc3345
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ nginx:

worker:
build: .
command: command: celery worker -A open_fmri.celery -Q default -n default@%h
env_file: .env
volumes:
.:/app
- .:/app
links:
- uwsgi
working_dir: /app

opensmtpd:
build: ./opensmtpd/
Expand Down
4 changes: 4 additions & 0 deletions open_fmri/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)

app.conf.update(
CELERY_RESULT_BACKEND='djcelery.backends.database:DatabaseBackend',
)

@app.task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.request))

0 comments on commit ccc3345

Please sign in to comment.