Beispiel #1
0
    def _tail_messagebus(self):

        def job_complete(f):
            self.cnt_number = f.result()

        while True:
            if self.should_stop():
                break
            message = yield self.job_queue.get()
            schedule_at_loop(self.io_loop, self.terminal_message_flow(message),
                             job_complete)
            self.job_queue.task_done()
            gen_log.info("INCOMING MSG: %s", message)
Beispiel #2
0
 def init_workflow(self):
     schedule_at_loop(self.io_loop, self._tail_messagebus,
                      callback=self._handle_message_flow)
     schedule_at_loop(self.io_loop, self._tail_stream_buffer,
                      callback=self._handle_message_flow)