Esempio n. 1
0
 def remove(self):
     queue.stop(spec={
         'type': 'dh_params',
         'server_id': self.id,
     })
     self.remove_primary_user()
     mongo.MongoObject.remove(self)
Esempio n. 2
0
 def remove(self):
     queue.stop(spec={
         'type': 'dh_params',
         'server_id': self.id,
     })
     self.remove_primary_user()
     mongo.MongoObject.remove(self)
Esempio n. 3
0
    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()
Esempio n. 4
0
    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()
Esempio n. 5
0
    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()
Esempio n. 6
0
 def remove(self):
     queue.stop(spec={"type": "dh_params", "server_id": self.id})
     self.remove_primary_user()
     mongo.MongoObject.remove(self)