Commit 93d7fdc0 by Bach Dániel

add send_notification task

parent edd39f93
...@@ -101,6 +101,13 @@ def get_keys(vm): ...@@ -101,6 +101,13 @@ def get_keys(vm):
command='get_keys', args={}, uuid=get_keys.request.id) command='get_keys', args={}, uuid=get_keys.request.id)
@celery.task(name='agent.send_notification')
def send_notification(vm, msg):
logger.debug('send_notification(%s, %s)', vm, msg)
return reactor.connections[vm].send_command(
command='send_notification', args={'msg': msg})
@celery.task(name='vm.tasks.local_agent_tasks.agent_started') @celery.task(name='vm.tasks.local_agent_tasks.agent_started')
def agent_started(vm): def agent_started(vm):
print vm print vm
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment