(self)
| 129 | invQueue.put((row[0], row[1], row[2])) |
| 130 | |
| 131 | def reRandomiseStems(self): |
| 132 | with self.lock: |
| 133 | try: |
| 134 | # random two connections |
| 135 | self.stem = sample(network.connectionpool.BMConnectionPool().outboundConnections.values(), MAX_STEMS) |
| 136 | # not enough stems available |
| 137 | except ValueError: |
| 138 | self.stem = network.connectionpool.BMConnectionPool().outboundConnections.values() |
| 139 | self.nodeMap = {} |
| 140 | # hashMap stays to cater for pending stems |
| 141 | self.refresh = time() + REASSIGN_INTERVAL |