-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Use Redis as celery broker in dev environment #213
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -50,9 +50,14 @@ | |||
|
||||
# CloudAMQP-suggested settings | ||||
# https://www.cloudamqp.com/docs/celery.html | ||||
|
||||
# If using Heroku Redis addon, consult the connection limits for your tier to see if it's safe | ||||
# to raise this: https://elements.heroku.com/addons/heroku-redis | ||||
# Keep in mind that celery workers may not be the only use of Redis in a deployment. | ||||
CELERY_BROKER_POOL_LIMIT = 1 | ||||
CELERY_BROKER_HEARTBEAT = None | ||||
CELERY_BROKER_CONNECTION_TIMEOUT = 30 | ||||
Comment on lines
57
to
59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are all of these values still the appropriate defaults? If they need to be set per-deployment, these should be moved out of the |
||||
# The following settings are only used with the AMQP transport. | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
If we're moving to Redis, we should remove anything AMQP-specific. |
||||
CELERY_EVENT_QUEUE_EXPIRES = 60 | ||||
|
||||
# Note, CELERY_WORKER settings could be different on each running worker. | ||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
DJANGO_SETTINGS_MODULE={{ cookiecutter.pkg_name }}.settings.development | ||
DJANGO_DATABASE_URL=postgres://postgres:postgres@postgres:5432/django | ||
DJANGO_CELERY_BROKER_URL=amqp://rabbitmq:5672/ | ||
DJANGO_CELERY_BROKER_URL=redis://redis:6379/0 | ||
DJANGO_MINIO_STORAGE_URL=http://minioAccessKey:minioSecretKey@minio:9000/django-storage | ||
DJANGO_MINIO_STORAGE_MEDIA_URL=http://localhost:9000/django-storage |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
DJANGO_SETTINGS_MODULE={{ cookiecutter.pkg_name }}.settings.development | ||
DJANGO_DATABASE_URL=postgres://postgres:postgres@localhost:5432/django | ||
DJANGO_CELERY_BROKER_URL=amqp://localhost:5672/ | ||
DJANGO_CELERY_BROKER_URL=redis://localhost:6379/0 | ||
DJANGO_MINIO_STORAGE_URL=http://minioAccessKey:minioSecretKey@localhost:9000/django-storage |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,13 +10,12 @@ services: | |||||
volumes: | ||||||
- postgres:/var/lib/postgresql/data | ||||||
|
||||||
rabbitmq: | ||||||
image: rabbitmq:management-alpine | ||||||
ports: | ||||||
- 5672:5672 | ||||||
- 15672:15672 | ||||||
redis: | ||||||
image: redis:latest | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should use the Alpine image. |
||||||
volumes: | ||||||
- rabbitmq:/var/lib/rabbitmq | ||||||
- redis-data:/redis/data | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this path correct? The Docker image shows that |
||||||
ports: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put this in consistent ordering as the things in this file: |
||||||
- 6379:6379 | ||||||
|
||||||
minio: | ||||||
image: minio/minio:latest | ||||||
|
@@ -35,4 +34,4 @@ services: | |||||
volumes: | ||||||
postgres: | ||||||
minio: | ||||||
rabbitmq: | ||||||
redis-data: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Use a name consistent with the others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed?