Ejemplo n.º 1
0
    def get_consumers(self, consumer, channel):
        return [
            consumer(queues=[announcement.get_queue(routing_key=publishers.ANY_RK,
                                                    exclusive=True)],
                     accept=['pickle'],
                     callbacks=[self.processor()]),

            consumer(queues=[execution.get_queue(routing_key=publishers.ANY_RK,
                                                 exclusive=True)],
                     accept=['pickle'],
                     callbacks=[self.processor(ActionExecutionAPI)]),

            consumer(queues=[Queue(None,
                                   liveaction.LIVEACTION_XCHG,
                                   routing_key=publishers.ANY_RK,
                                   exclusive=True)],
                     accept=['pickle'],
                     callbacks=[self.processor(LiveActionAPI)])
        ]
Ejemplo n.º 2
0
 def get_consumers(self, consumer, channel):
     return [
         consumer(queues=[
             announcement.get_queue(routing_key=publishers.ANY_RK,
                                    exclusive=True)
         ],
                  accept=['pickle'],
                  callbacks=[self.processor()]),
         consumer(queues=[
             execution.get_queue(routing_key=publishers.ANY_RK,
                                 exclusive=True)
         ],
                  accept=['pickle'],
                  callbacks=[self.processor(ActionExecutionAPI)]),
         consumer(queues=[
             Queue(None,
                   liveaction.LIVEACTION_XCHG,
                   routing_key=publishers.ANY_RK,
                   exclusive=True)
         ],
                  accept=['pickle'],
                  callbacks=[self.processor(LiveActionAPI)])
     ]
Ejemplo n.º 3
0
                                          routing_key=publishers.UPDATE_RK)

# Used by the notifier service
NOTIFIER_ACTIONUPDATE_WORK_QUEUE = execution.get_queue(
    'st2.notifiers.execution.work', routing_key=publishers.UPDATE_RK)

# Used by the results tracker service
RESULTSTRACKER_ACTIONSTATE_WORK_QUEUE = actionexecutionstate.get_queue(
    'st2.resultstracker.work', routing_key=publishers.CREATE_RK)

# Used by the rules engine service
RULESENGINE_WORK_QUEUE = reactor.get_trigger_instances_queue(
    name='st2.trigger_instances_dispatch.rules_engine', routing_key='#')

# Used by the stream service
STREAM_ANNOUNCEMENT_WORK_QUEUE = announcement.get_queue(
    routing_key=publishers.ANY_RK, exclusive=True, auto_delete=True)

STREAM_EXECUTION_ALL_WORK_QUEUE = execution.get_queue(
    routing_key=publishers.ANY_RK, exclusive=True, auto_delete=True)

STREAM_EXECUTION_UPDATE_WORK_QUEUE = execution.get_queue(
    routing_key=publishers.UPDATE_RK, exclusive=True, auto_delete=True)

STREAM_LIVEACTION_WORK_QUEUE = Queue(None,
                                     liveaction.LIVEACTION_XCHG,
                                     routing_key=publishers.ANY_RK,
                                     exclusive=True,
                                     auto_delete=True)

# TODO: Perhaps we should use pack.action name as routing key
# so we can do more efficient filtering later, if needed
Ejemplo n.º 4
0
Archivo: queues.py Proyecto: nzlosh/st2
# Used by the results tracker service
RESULTSTRACKER_ACTIONSTATE_WORK_QUEUE = actionexecutionstate.get_queue(
    'st2.resultstracker.work',
    routing_key=publishers.CREATE_RK)


# Used by the rules engine service
RULESENGINE_WORK_QUEUE = reactor.get_trigger_instances_queue(
    name='st2.trigger_instances_dispatch.rules_engine',
    routing_key='#')


# Used by the stream service
STREAM_ANNOUNCEMENT_WORK_QUEUE = announcement.get_queue(
    routing_key=publishers.ANY_RK,
    exclusive=True,
    auto_delete=True)

STREAM_EXECUTION_ALL_WORK_QUEUE = execution.get_queue(
    routing_key=publishers.ANY_RK,
    exclusive=True,
    auto_delete=True)

STREAM_EXECUTION_UPDATE_WORK_QUEUE = execution.get_queue(
    routing_key=publishers.UPDATE_RK,
    exclusive=True,
    auto_delete=True)

STREAM_LIVEACTION_WORK_QUEUE = Queue(
    None,
    liveaction.LIVEACTION_XCHG,