remotelogin/connections/base/mixins.py
def check_output_nb(self, command, metadata=None, **kwargs):
        """ sends a command to a connection non-blocking and start a thread to wait for the response

        :param str command: command to send to the connection
        :param str return_type: one of string, stream or list
        :rtype: fdutils.parallel.StoppableThreadWithTextQueue

        :return:
        :rtype: fdutils.parallel.StoppableThreadWithQueueAndCallback
        """

        def callback(th):
            self.data.new_received(th.get_data())

        log.debug("{} - Sending cmd: {}".format(self.__class__.__name__, command))
        self.data.new_sent(command, metadata=metadata)

        recv_data_timeout = settings.NON_BLOCKING_RECEIVED_DATA_TIMEOUT
        run_timeout = kwargs.pop('timeout', 0)

        command = command.strip()
        target_out, channel = self._check_output_nb(command, **kwargs)

        th_out = fdutils.parallel.ThreadLoopWithQueue(
            target_out['target'], args=target_out['args'], run_timeout=run_timeout, join_timeout=self.nb_join_timeout,
            recv_data_timeout=recv_data_timeout)
        th_out.add_call_on_stop(callback, args=(th_out,))
        th_out.add_call_on_stop(channel.close)
        th_out.start()

        return th_out
 sends a command to a connection non-blocking and start a thread to wait for the response

        :param str command: command to send to the connection
        :param str return_type: one of string, stream or list
        :rtype: fdutils.parallel.StoppableThreadWithTextQueue

        :return:
        :rtype: fdutils.parallel.StoppableThreadWithQueueAndCallback
        
sends a command to a connection non-blocking and start a thread to wait for the response
sends a command to a connection non - blocking and start a thread to wait for the response
def check_output_nb(self, command, metadata=None, **kwargs):
        def callback(th):
            self.data.new_received(th.get_data())
        log.debug("{} - Sending cmd: {}".format(self.__class__.__name__, command))
        self.data.new_sent(command, metadata=metadata)
        recv_data_timeout = settings.NON_BLOCKING_RECEIVED_DATA_TIMEOUT
        run_timeout = kwargs.pop('timeout', 0)
        command = command.strip()
        target_out, channel = self._check_output_nb(command, **kwargs)
        th_out = fdutils.parallel.ThreadLoopWithQueue(
            target_out['target'], args=target_out['args'], run_timeout=run_timeout, join_timeout=self.nb_join_timeout,
            recv_data_timeout=recv_data_timeout)
        th_out.add_call_on_stop(callback, args=(th_out,))
        th_out.add_call_on_stop(channel.close)
        th_out.start()
        return th_out
def check_output_nb ( self , command , metadata = None , ** kwargs ) : def callback ( th ) : self . data . new_received ( th . get_data ( ) ) log . debug ( "{} - Sending cmd: {}" . format ( self . __class__ . __name__ , command ) ) self . data . new_sent ( command , metadata = metadata ) recv_data_timeout = settings . NON_BLOCKING_RECEIVED_DATA_TIMEOUT run_timeout = kwargs . pop ( 'timeout' , 0 ) command = command . strip ( ) target_out , channel = self . _check_output_nb ( command , ** kwargs ) th_out = fdutils . parallel . ThreadLoopWithQueue ( target_out [ 'target' ] , args = target_out [ 'args' ] , run_timeout = run_timeout , join_timeout = self . nb_join_timeout , recv_data_timeout = recv_data_timeout ) th_out . add_call_on_stop ( callback , args = ( th_out , ) ) th_out . add_call_on_stop ( channel . close ) th_out . start ( ) return th_out
sends a command to a connection non-blocking and start a thread to wait for the response
sends a command to a connection non - blocking and start a thread to wait for the response
""" sends a command to a connection non-blocking and start a thread to wait for the response

        :param str command: command to send to the connection
        :param str return_type: one of string, stream or list
        :rtype: fdutils.parallel.StoppableThreadWithTextQueue

        :return:
        :rtype: fdutils.parallel.StoppableThreadWithQueueAndCallback
        """
None
fdutils.parallel.StoppableThreadWithQueueAndCallback
self
command
command to send to the connection
command to send to the connection
metadata
return_type
one of string, stream or list
one of string stream or list