示例#1
0
文件: bolt.py 项目: Gwan-He/pyleus
    def _process_tuple(self, tup):
        """SimpleBolt middleware level tuple processing."""
        if is_tick(tup):
            self.process_tick()
        else:
            self.process_tuple(tup)

        self.ack(tup)
示例#2
0
    def _process_tuple(self, tup):
        """SimpleBolt middleware level tuple processing."""
        if is_tick(tup):
            self.process_tick()
        else:
            self.process_tuple(tup)

        self.ack(tup)
示例#3
0
 def test_is_tick_false(self):
     tup = StormTuple(None, '__system', None, None, None)
     assert not is_tick(tup)
     tup = StormTuple(None, None, '__tick', None, None)
     assert not is_tick(tup)
示例#4
0
 def test_is_tick_true(self):
     tup = StormTuple(None, '__system', '__tick', None, None)
     assert is_tick(tup)