mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
control celery routes using celery router
* Each time a route is needed (i.e. when a task is sumitted to celery). The router will be queried. This is ideal. With the previous method we had to consider how a change in the routes would propogate to all celery workers and nodes. * fully describe the default awx queue * Our dynamic queue registration would correct awx_private_queue. However, we don't want celery to even create an "invalid"/extra queue-exchange-route. This change makes sure we don't create extranious things in rabbitmq. * reduce the cluster queue registration output. Only output when the queue registration list changes.
This commit is contained in:
@@ -454,6 +454,9 @@ BROKER_POOL_LIMIT = None
|
||||
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
|
||||
CELERY_EVENT_QUEUE_TTL = 5
|
||||
CELERY_DEFAULT_QUEUE = 'awx_private_queue'
|
||||
CELERY_DEFAULT_EXCHANGE = 'awx_private_queue'
|
||||
CELERY_DEFAULT_ROUTING_KEY = 'awx_private_queue'
|
||||
CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
|
||||
CELERY_TASK_SERIALIZER = 'json'
|
||||
CELERY_RESULT_SERIALIZER = 'json'
|
||||
CELERY_ACCEPT_CONTENT = ['json']
|
||||
@@ -465,7 +468,7 @@ CELERYD_AUTOSCALER = 'awx.main.utils.autoscale:DynamicAutoScaler'
|
||||
CELERY_RESULT_BACKEND = 'djcelery.backends.database:DatabaseBackend'
|
||||
CELERY_IMPORTS = ('awx.main.scheduler.tasks',)
|
||||
CELERY_QUEUES = ()
|
||||
CELERY_ROUTES = {}
|
||||
CELERY_ROUTES = ('awx.main.utils.ha.AWXCeleryRouter',)
|
||||
|
||||
|
||||
def log_celery_failure(*args):
|
||||
|
||||
Reference in New Issue
Block a user