irrad_control/main.py
def send_cmd(self, hostname, target, cmd, cmd_data=None, check_reply=True):
        """Send a command *cmd* to a target *target* running within the server or interpreter process.
        The command can have respective data *cmd_data*. Targets must be listed in self._targets."""

        if target not in self._targets:
            msg = '{} not in known by command targets. Known targets: {}'.format(target, ', '.join(self._targets))
            logging.error(msg)
            return

        cmd_dict = {'target': target, 'cmd': cmd, 'data': cmd_data}
        cmd_worker = Worker(self._send_cmd_get_reply, hostname, cmd_dict)

        # Make connections
        self._connect_worker_exception(worker=cmd_worker)

        # Keep track of commands
        if check_reply:
            self._connect_worker_close(cmd_worker, hostname)

        # Start
        self.threadpool.start(cmd_worker)
Send a command *cmd* to a target *target* running within the server or interpreter process.
        The command can have respective data *cmd_data*. Targets must be listed in self._targets.
Send a command *cmd* to a target *target* running within the server or interpreter process.
The command can have respective data *cmd_data*. Targets must be listed in self._targets.
Send a command * cmd * to a target * target * running within the server or interpreter process . The command can have respective data * cmd_data * . Targets must be listed in self . _targets .
def send_cmd(self, hostname, target, cmd, cmd_data=None, check_reply=True):
        if target not in self._targets:
            msg = '{} not in known by command targets. Known targets: {}'.format(target, ', '.join(self._targets))
            logging.error(msg)
            return
        cmd_dict = {'target': target, 'cmd': cmd, 'data': cmd_data}
        cmd_worker = Worker(self._send_cmd_get_reply, hostname, cmd_dict)
        self._connect_worker_exception(worker=cmd_worker)
        if check_reply:
            self._connect_worker_close(cmd_worker, hostname)
        self.threadpool.start(cmd_worker)
def send_cmd ( self , hostname , target , cmd , cmd_data = None , check_reply = True ) : if target not in self . _targets : msg = '{} not in known by command targets. Known targets: {}' . format ( target , ', ' . join ( self . _targets ) ) logging . error ( msg ) return cmd_dict = { 'target' : target , 'cmd' : cmd , 'data' : cmd_data } cmd_worker = Worker ( self . _send_cmd_get_reply , hostname , cmd_dict ) self . _connect_worker_exception ( worker = cmd_worker ) if check_reply : self . _connect_worker_close ( cmd_worker , hostname ) self . threadpool . start ( cmd_worker )
Send a command *cmd* to a target *target* running within the server or interpreter process.
Send a command * cmd * to a target * target * running within the server or interpreter process .
"""Send a command *cmd* to a target *target* running within the server or interpreter process.
        The command can have respective data *cmd_data*. Targets must be listed in self._targets.""" # Make connections # Keep track of commands # Start
self
hostname
target
cmd
cmd_data
check_reply