(self)
| 49 | self.send() |
| 50 | |
| 51 | def send(self): |
| 52 | while self.transaction and self.sender.credit and (self.committed + self.current_batch) < self.total: |
| 53 | seq = self.committed + self.current_batch + 1 |
| 54 | msg = Message(id=seq, body={'sequence': seq}) |
| 55 | self.transaction.send(self.sender, msg) |
| 56 | self.current_batch += 1 |
| 57 | if self.current_batch == self.batch_size: |
| 58 | self.transaction.commit() |
| 59 | self.transaction = None |
| 60 | |
| 61 | def on_accepted(self, event): |
| 62 | if event.sender == self.sender: |
no test coverage detected