Exemplo n.º 1
0
    def unregister_consumer(self):
        dst_db = self.get_database(self.target_db)
        state = self.get_consumer_state()
        src_db = self.get_provider_db(state)

        # unregister on provider
        Consumer.unregister_consumer(self)

        # unregister on subscriber
        q = "select * from pgq_node.unregister_consumer(%s, %s)"
        self.exec_cmd(dst_db, q, [ self.queue_name, self.consumer_name ])
Exemplo n.º 2
0
    def unregister_consumer(self):
        dst_db = self.get_database(self.target_db)
        state = self.get_consumer_state()
        src_db = self.get_provider_db(state)

        # unregister on provider
        Consumer.unregister_consumer(self)

        # unregister on subscriber
        q = "select * from pgq_node.unregister_consumer(%s, %s)"
        self.exec_cmd(dst_db, q, [self.queue_name, self.consumer_name])
Exemplo n.º 3
0
    def unregister_consumer(self):
        dst_db = self.get_database(self.target_db)
        dst_curs = dst_db.cursor()

        # fetch provider loc
        q = "select * from pgq_node.get_consumer_state(%s, %s)"
        rows = self.exec_cmd(dst_db, q, [ self.queue_name, self.consumer_name ])
        state = rows[0]
        provider_loc = state['provider_location']

        # unregister on provider
        src_db = self.get_database(PDB, connstr = provider_loc)
        src_curs = src_db.cursor()
        Consumer.unregister_consumer(self)

        # unregister on subscriber
        q = "select * from pgq_node.unregister_consumer(%s, %s)"
        self.exec_cmd(dst_db, q, [ self.queue_name, self.consumer_name ])
Exemplo n.º 4
0
    def unregister_consumer(self):
        """If unregistering, also clean completed tick table on dest."""

        Consumer.unregister_consumer(self)
        self.dst_reset()
Exemplo n.º 5
0
    def unregister_consumer(self):
        """If unregistering, also clean completed tick table on dest."""

        Consumer.unregister_consumer(self)
        self.dst_reset()