def remove(self): queue.stop(spec={ 'type': 'dh_params', 'server_id': self.id, }) self.remove_primary_user() mongo.MongoObject.remove(self)
def generate_dh_param(self): doc = queue.find({"type": "dh_params", "server_id": self.id}) if doc: if doc["dh_param_bits"] != self.dh_param_bits: queue.stop(doc["_id"]) else: return reserved = queue.reserve("pooled_dh_params", svr=self) if not reserved: reserved = queue.reserve("queued_dh_params", svr=self) if reserved: queue.start("dh_params", dh_param_bits=self.dh_param_bits, priority=LOW) return self.queue_dh_params()
def generate_dh_param(self): doc = queue.find({ 'type': 'dh_params', 'server_id': self.id, }) if doc: if doc['dh_param_bits'] != self.dh_param_bits: queue.stop(doc['_id']) else: return reserved = queue.reserve('pooled_dh_params', svr=self) if not reserved: reserved = queue.reserve('queued_dh_params', svr=self) if reserved: queue.start('dh_params', dh_param_bits=self.dh_param_bits, priority=LOW) return self.queue_dh_params()
def remove(self): queue.stop(spec={"type": "dh_params", "server_id": self.id}) self.remove_primary_user() mongo.MongoObject.remove(self)