Commit 9dc16e46 authored by Federico Sismondi's avatar Federico Sismondi
Browse files

agent pushed now a bootrapped message to bus

parent 66e48218
......@@ -3,6 +3,7 @@ Plugin to connect to the F-interop backend
"""
import json
import logging
from kombu import Producer
from .base import BaseController, BaseConsumer
......@@ -40,6 +41,18 @@ class CoreConsumer(BaseConsumer):
session=self.session))
log.info("-------------------------------------------------")
# let's send bootstrap message
msg = {
'message': '{component} is up!'.format(component=self.name),
"_type": '{component}.ready'.format(component=self.name)
}
producer = Producer(connection,serializer='json')
producer.publish(msg,
exchange=self.exchange,
routing_key='control.session.bootstrap'
)
def handle_control(self, body, message):
log.debug("DEFAULT HANDLE CONTROL")
log.debug(("Payload", message.payload))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment