ternya/ternya.py
def init_nova_consumer(self, mq):
        """
        Init openstack nova mq

        1. Check if enable listening nova notification
        2. Create consumer

        :param mq: class ternya.mq.MQ
        """
        if not self.enable_component_notification(Openstack.Nova):
            log.debug("disable listening nova notification")
            return

        for i in range(self.config.nova_mq_consumer_count):
            mq.create_consumer(self.config.nova_mq_exchange,
                               self.config.nova_mq_queue,
                               ProcessFactory.process(Openstack.Nova))
        log.debug("enable listening openstack nova notification.")
def init_nova_consumer(self, mq):
        """
        Init openstack nova mq

        1. Check if enable listening nova notification
        2. Create consumer

        :param mq: class ternya.mq.MQ
        """
        if not self.enable_component_notification(Openstack.Nova):
            log.debug("disable listening nova notification")
            return

        for i in range(self.config.nova_mq_consumer_count):
            mq.create_consumer(self.config.nova_mq_exchange,
                               self.config.nova_mq_queue,
                               ProcessFactory.process(Openstack.Nova))
        log.debug("enable listening openstack nova notification.")
Init openstack nova mq

        1. Check if enable listening nova notification
        2. Create consumer

        :param mq: class ternya.mq.MQ