use celery 3.x BROKER_URL

* Celery 4.x specifies the broker via CELERY_BROKER_URL. Since we are
now on 3.x, use 3.x way of specifying the broker via BROKER_URL
This commit is contained in:
chris meyers
2018-02-27 11:21:58 -05:00
parent 91c6d406c5
commit fe05b4c0d5
2 changed files with 7 additions and 7 deletions

View File

@@ -81,15 +81,15 @@ if is_testing(sys.argv):
MONGO_DB = 'system_tracking_test' MONGO_DB = 'system_tracking_test'
# Celery AMQP configuration. # Celery AMQP configuration.
CELERY_BROKER_URL = "amqp://{}:{}@{}/{}".format(os.environ.get("RABBITMQ_USER"), BROKER_URL = "amqp://{}:{}@{}/{}".format(os.environ.get("RABBITMQ_USER"),
os.environ.get("RABBITMQ_PASS"), os.environ.get("RABBITMQ_PASS"),
os.environ.get("RABBITMQ_HOST"), os.environ.get("RABBITMQ_HOST"),
urllib.quote(os.environ.get("RABBITMQ_VHOST", "/"), safe='')) urllib.quote(os.environ.get("RABBITMQ_VHOST", "/"), safe=''))
CHANNEL_LAYERS = { CHANNEL_LAYERS = {
'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer', 'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer',
'ROUTING': 'awx.main.routing.channel_routing', 'ROUTING': 'awx.main.routing.channel_routing',
'CONFIG': {'url': CELERY_BROKER_URL}} 'CONFIG': {'url': BROKER_URL}}
} }
# Mongo host configuration # Mongo host configuration

View File

@@ -78,7 +78,7 @@ data:
'PORT': "{{ pg_port }}", 'PORT': "{{ pg_port }}",
} }
} }
CELERY_BROKER_URL = 'amqp://{}:{}@{}:{}/{}'.format( BROKER_URL = 'amqp://{}:{}@{}:{}/{}'.format(
"awx", "awx",
"abcdefg", "abcdefg",
"localhost", "localhost",
@@ -87,7 +87,7 @@ data:
CHANNEL_LAYERS = { CHANNEL_LAYERS = {
'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer', 'default': {'BACKEND': 'asgi_amqp.AMQPChannelLayer',
'ROUTING': 'awx.main.routing.channel_routing', 'ROUTING': 'awx.main.routing.channel_routing',
'CONFIG': {'url': CELERY_BROKER_URL}} 'CONFIG': {'url': BROKER_URL}}
} }
CACHES = { CACHES = {
'default': { 'default': {