def run(self):

        self.logger.debug("Controller started.")

        response = {}
        while True:
            task = self.tq.get()
            if task == "stop":
                break
            try:
                response = self.call_method(task.sender, task.body)

            except ResourceException as err:
                self.logger.error("%s" % err)

                if response.get('status'):
                    del response['status']
                response['error'] = '%s' % err

            except Exception:
                self.logger.debug('{0}'.format(traceback.format_exc()))

            finally:
                self.pq.put(AmqpTask(response, headers=task.headers))
Implementation of the Threading run method. This methods waits on
dataset/ETHPy150Open comodit/synapse-agent/synapse/controller.py/Controller.run