If fail_on_error was set to False, a list of (success, response) tuples will be returned. If success is False, response will be an Exception. Otherwise, response will be the normal query response. If fail_on_error was left as True and one of the requests f
(self, timeout=None)
| 1632 | self.event.set() |
| 1633 | |
| 1634 | def deliver(self, timeout=None): |
| 1635 | """ |
| 1636 | If fail_on_error was set to False, a list of (success, response) |
| 1637 | tuples will be returned. If success is False, response will be |
| 1638 | an Exception. Otherwise, response will be the normal query response. |
| 1639 | |
| 1640 | If fail_on_error was left as True and one of the requests |
| 1641 | failed, the corresponding Exception will be raised. Otherwise, |
| 1642 | the normal response will be returned. |
| 1643 | """ |
| 1644 | self.event.wait(timeout) |
| 1645 | if self.error: |
| 1646 | raise self.error |
| 1647 | elif not self.event.is_set(): |
| 1648 | raise OperationTimedOut() |
| 1649 | else: |
| 1650 | return self.responses |
| 1651 | |
| 1652 | |
| 1653 | class HeartbeatFuture(object): |
no test coverage detected