def external_commands(self):
        """Get the external commands from the daemon

        Use a lock for this function to protect

        :return: serialized external command list
        :rtype: str
        """
        res = []
        with self.app.external_commands_lock:
            for cmd in self.app.get_external_commands():
                res.append(cmd.serialize())
        return res
Get the external commands from the daemon

        Use a lock for this function to protect

        :return: serialized external command list
        :rtype: str