ternya/ternya.py
def init_swift_consumer(self, mq):
        """
        Init openstack swift mq

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

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

        for i in range(self.config.swift_mq_consumer_count):
            mq.create_consumer(self.config.swift_mq_exchange,
                               self.config.swift_mq_queue,
                               ProcessFactory.process(Openstack.Swift))

        log.debug("enable listening openstack swift notification.")
def init_swift_consumer(self, mq):
        """
        Init openstack swift mq

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

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

        for i in range(self.config.swift_mq_consumer_count):
            mq.create_consumer(self.config.swift_mq_exchange,
                               self.config.swift_mq_queue,
                               ProcessFactory.process(Openstack.Swift))

        log.debug("enable listening openstack swift notification.")
def init_swift_consumer ( self , mq ) : if not self . enable_component_notification ( Openstack . Swift ) : log . debug ( "disable listening swift notification" ) return for i in range ( self . config . swift_mq_consumer_count ) : mq . create_consumer ( self . config . swift_mq_exchange , self . config . swift_mq_queue , ProcessFactory . process ( Openstack . Swift ) ) log . debug ( "enable listening openstack swift notification." )
Init openstack swift mq

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

        :param mq: class ternya.mq.MQ
Init openstack swift mq