Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Commit 9230210

Browse files
committed
adds support for celery with rediscloud
1 parent 6ec4245 commit 9230210

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

flask_heroku.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ def init_app(self, app):
2525
app.config.setdefault('GOOGLE_DOMAIN', environ.get('GOOGLE_DOMAIN'))
2626

2727
# Celery w/ RabbitMQ
28-
app.config.setdefault('BROKER_URL', environ.get('RABBITMQ_URL'))
28+
if 'RABBITMQ_URL' in environ:
29+
app.config.setdefault('BROKER_URL', environ.get('RABBITMQ_URL'))
30+
# Celery w/ RedisCloud
31+
elif 'REDISCLOUD_URL' in environ:
32+
app.config.setdefault('BROKER_URL', environ.get('REDISCLOUD_URL'))
33+
app.config.setdefault('BROKER_BACKEND', environ.get('REDISCLOUD_URL'))
2934

3035
# Mailgun
3136
if 'MAILGUN_SMTP_SERVER' in environ:

0 commit comments

Comments
 (0)