Exemplo n.º 1
0
    def on_close(self):

        creator.terminate_rd_session(self.agent_id)

        if self.client.subscribed:
            self.client.unsubscribe(self.channel)
            self.client.disconnect()
Exemplo n.º 2
0
    def on_close(self):

        creator.terminate_rd_session(self.agent_id)

        if self.client.subscribed:
            self.client.unsubscribe(self.channel)
            self.client.disconnect()
Exemplo n.º 3
0
    def delete(self):

        current_user = self.get_current_user()
        body = json.loads(self.request.body)
        agent_id = body.get('agent_id')

        results = creator.terminate_rd_session(agent_id=agent_id,
                                               user=current_user)

        self.set_header('Content-Type', 'application/json')
        self.write(json.dumps(results, indent=4))
Exemplo n.º 4
0
    def delete(self, agent_id=None):

        current_user = self.get_current_user()
        #body = json.loads(self.request.body)
        #agent_id = body.get('agent_id')

        results = creator.terminate_rd_session(
            agent_id=agent_id,
            user=current_user
        )

        self.set_header('Content-Type', 'application/json')
        self.write(json.dumps(results, indent=4))