Example #1
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)
Example #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)
Example #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)
Example #4
0
 def test_is_tick_true(self):
     tup = StormTuple(None, '__system', '__tick', None, None)
     assert is_tick(tup)