Ejemplo n.º 1
0
    def __init__(self, queue, url, manager="_default_"):
        self.queue = queue
        self.url = url
        self.manager = manager
        self.active = True
        self.exchange = get_exchange(url, manager, {})

        self.messages = []
Ejemplo n.º 2
0
 def _request_status(self, test, job_id):
     mq_url = "memory://test_%s" % test
     manager = "manager_%s" % test
     exchange = get_exchange(mq_url, manager, {})
     params = {
         "job_id": job_id,
         ACK_FORCE_NOACK_KEY: True,
     }
     exchange.publish("status", params)
Ejemplo n.º 3
0
def get_exchange(connection_string, manager_name, conf):
    # HACK: Fixup non-string parameters - utlimately this should reuse spec
    # stuff from Galaxy.
    for param, to_type in TYPED_PARAMS.items():
        if param in conf:
            val = conf[param]
            conf[param] = to_type(val)

    pulsar_exchange = amqp_exchange_factory.get_exchange(
        connection_string, manager_name, conf)
    return pulsar_exchange
Ejemplo n.º 4
0
def get_exchange(connection_string, manager_name, conf):
    # HACK: Fixup non-string parameters - utlimately this should reuse spec
    # stuff from Galaxy.
    for param, to_type in TYPED_PARAMS.items():
        if param in conf:
            val = conf[param]
            conf[param] = to_type(val)

    pulsar_exchange = amqp_exchange_factory.get_exchange(
        connection_string,
        manager_name,
        conf
    )
    return pulsar_exchange