Esempio n. 1
0
 def on_message_out(self, tp: TP, offset: int, message: Message) -> None:
     """Call when message is fully acknowledged and can be committed."""
     self.messages_active -= 1
     time_out = message.time_out = self.time()
     time_in = message.time_in
     if time_in is not None:
         message.time_total = time_out - time_in
Esempio n. 2
0
 def on_message_out(self,
                    tp: TP,
                    offset: int,
                    message: Message) -> None:
     self.messages_active -= 1
     time_out = message.time_out = self.time()
     time_in = message.time_in
     if time_in is not None:
         message.time_total = time_out - time_in