diff --git a/compass/db/api/machine.py b/compass/db/api/machine.py index 5e724f5a..9a8d3eac 100644 --- a/compass/db/api/machine.py +++ b/compass/db/api/machine.py @@ -228,10 +228,7 @@ def poweron_machine( ) celery_client.celery.send_task( 'compass.tasks.poweron_machine', - (machine_id,), - queue=user.email, - exchange=user.email, - routing_key=user.email + (machine_id,) ) return { 'status': 'poweron %s action sent' % machine.mac, @@ -258,10 +255,7 @@ def poweroff_machine( ) celery_client.celery.send_task( 'compass.tasks.poweroff_machine', - (machine_id,), - queue=user.email, - exchange=user.email, - routing_key=user.email + (machine_id,) ) return { 'status': 'poweroff %s action sent' % machine.mac, @@ -288,10 +282,7 @@ def reset_machine( ) celery_client.celery.send_task( 'compass.tasks.reset_machine', - (machine_id,), - queue=user.email, - exchange=user.email, - routing_key=user.email + (machine_id,) ) return { 'status': 'reset %s action sent' % machine.mac, diff --git a/compass/db/api/switch.py b/compass/db/api/switch.py index f3e27ebc..4c7c8e59 100644 --- a/compass/db/api/switch.py +++ b/compass/db/api/switch.py @@ -838,10 +838,7 @@ def poll_switch(switch_id, user=None, session=None, **kwargs): switch = _get_switch(switch_id, session=session) celery_client.celery.send_task( 'compass.tasks.pollswitch', - (user.email, switch.ip, switch.credentials), - queue=user.email, - exchange=user.email, - routing_key=user.email + (user.email, switch.ip, switch.credentials) ) return { 'status': 'action %s sent' % kwargs, diff --git a/conf/celeryconfig b/conf/celeryconfig index f23858ba..f4911279 100644 --- a/conf/celeryconfig +++ b/conf/celeryconfig @@ -7,6 +7,3 @@ BROKER_URL = "amqp://guest:guest@localhost:5672//" CELERY_IMPORTS=("compass.tasks.tasks",) CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml'] C_FORCE_ROOT = 1 -CELERY_DEFAULT_QUEUE = 'admin@huawei.com' -CELERY_DEFAULT_EXCHANGE = 'admin@huawei.com' -CELERY_DEFAULT_ROUTING_KEY = 'admin@huawei.com'