示例#1
0
 def create_worker(self, topic, proxy, pool_name):
     """
     """
     proxy_cb = rpc_amqp.ProxyCallback(
         self.conf, proxy,
         rpc_amqp.get_connection_pool(self.conf, Connection))
     self.declare_topic_consumer(topic, proxy_cb, pool_name)
示例#2
0
 def create_consumer(self, topic, proxy, fanout=False):
     proxy_cb = rpc_amqp.ProxyCallback(
         self.conf, proxy,
         rpc_amqp.get_connection_pool(self.pool, Connection))
     if fanout:
         self.declare_fanout_consumer(topic, proxy_cb)
     else:
         self.declare_topic_consumer(topic, proxy_cb)
示例#3
0
def notify(conf, topic, msg):
    """
    """
    return rpc_amqp.notify(conf, topic, msg,
                           rpc_amqp.get_connection_pool(conf, Connection))
示例#4
0
def fanout_cast_to_server(conf, server_params, topic, msg):
    """
    """
    return rpc_amqp.fanout_cast_to_server(
        conf, server_params, topic, msg,
        rpc_amqp.get_connection_pool(conf, Connection()))
示例#5
0
def fanout_cast(conf, topic, msg):
    """
    """
    return rpc_amqp.fanout_cast(conf, topic, msg,
                                rpc_amqp.get_connection_pool(conf, Connection))
示例#6
0
def call(conf, topic, msg, timeout=None):
    """
    """
    return rpc_amqp.call(conf, topic, msg, timeout,
                         rpc_amqp.get_connection_pool(conf, Connection))
示例#7
0
def multicall(conf, topic, msg, timeout=None):
    return rpc_amqp.multicall(conf, topic, msg, timeout,
                              rpc_amqp.get_connection_pool(conf, Connection))
示例#8
0
def create_connection(conf, new=True):
    """
    """
    return rpc_amqp.create_connection(
        conf, new, rpc_amqp.get_connection_pool(conf, Connection))
示例#9
0
def notify(conf, topic, msg):
    """
    """
    return rpc_amqp.notify(conf, topic, msg, rpc_amqp.get_connection_pool(conf, Connection))
示例#10
0
def fanout_cast(conf, topic, msg):
    """
    """
    return rpc_amqp.fanout_cast(conf, topic, msg, rpc_amqp.get_connection_pool(conf, Connection))
示例#11
0
def fanout_cast_to_server(conf, server_params, topic, msg):
    """
    """
    return rpc_amqp.fanout_cast_to_server(
        conf, server_params, topic, msg, rpc_amqp.get_connection_pool(conf, Connection())
    )
示例#12
0
def call(conf, topic, msg, timeout=None):
    """
    """
    return rpc_amqp.call(conf, topic, msg, timeout, rpc_amqp.get_connection_pool(conf, Connection))
示例#13
0
def multicall(conf, topic, msg, timeout=None):
    return rpc_amqp.multicall(conf, topic, msg, timeout, rpc_amqp.get_connection_pool(conf, Connection))
示例#14
0
def create_connection(conf, new=True):
    """
    """
    return rpc_amqp.create_connection(conf, new, rpc_amqp.get_connection_pool(conf, Connection))
示例#15
0
 def create_worker(self, topic, proxy, pool_name):
     """
     """
     proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, rpc_amqp.get_connection_pool(self.conf, Connection))
     self.declare_topic_consumer(topic, proxy_cb, pool_name)
示例#16
0
 def create_consumer(self, topic, proxy, fanout=False):
     proxy_cb = rpc_amqp.ProxyCallback(self.conf, proxy, rpc_amqp.get_connection_pool(self.pool, Connection))
     if fanout:
         self.declare_fanout_consumer(topic, proxy_cb)
     else:
         self.declare_topic_consumer(topic, proxy_cb)