def runZoneTransfers(self, nameservers): sem = common.getSemaphore() deferreds = [] for ns in nameservers: deferreds.append(sem.run(self.tryZoneTransferTCP, ns)) deferreds.append(sem.run(self.tryZoneTransferUDP, ns)) dl = defer.DeferredList(deferreds) return dl
def prepare(self): deferreds = [] sem = common.getSemaphore() if isinstance(self.ports, dict): self.descriptions = self.ports self.ports = self.ports.keys() for port in self.ports: d = sem.run(self.doFactory, port) deferreds.append(d) dl = defer.DeferredList(deferreds, consumeErrors=False) return dl