Package ClusterShell :: Package Worker :: Module Exec :: Class ExecClient
[hide private]
[frames] | no frames]

Class ExecClient

source code


Run a simple local command.

Useful as a superclass for other more specific workers.

Instance Methods [hide private]
 
__init__(self, node, command, worker, stderr, timeout, autoclose=False, rank=None)
Create an EngineClient-type instance to locally run `command'.
source code
 
_build_cmd(self)
Build the shell command line to start the commmand.
source code
 
_start(self)
Prepare command and start client.
source code
 
_close(self, abort, timeout)
Close client.
source code
 
_on_nodeset_start(self, nodes)
local wrapper over _on_start that can also handle nodeset
source code
 
_on_nodeset_rc(self, nodes, rc)
local wrapper over _on_node_rc that can also handle nodeset
source code
 
_on_nodeset_msgline(self, nodes, msg, sname)
local wrapper over _on_node_msgline that can also handle nodeset
source code
 
_flush_read(self, sname)
Called at close time to flush stream read buffer.
source code
 
_handle_read(self, sname)
Handle a read notification.
source code

Inherited from EngineClient.EngineClient: __repr__, abort

Inherited from Engine.Engine.EngineBaseTimer: invalidate, is_valid, set_nextfire

Inherited from Engine.Engine.EngineBaseTimer (private): _set_engine

Method Details [hide private]

__init__(self, node, command, worker, stderr, timeout, autoclose=False, rank=None)
(Constructor)

source code 

Create an EngineClient-type instance to locally run `command'.

:param node: will be used as key.

Overrides: Engine.Engine.EngineBaseTimer.__init__

_build_cmd(self)

source code 

Build the shell command line to start the commmand.

Return a tuple containing command and arguments as a string or a list of string, and a dict of additional environment variables. None could be returned if no environment change is required.

_start(self)

source code 

Prepare command and start client.

Overrides: EngineClient.EngineClient._start

_close(self, abort, timeout)

source code 

Close client. See EngineClient._close().

Overrides: EngineClient.EngineClient._close

_flush_read(self, sname)

source code 

Called at close time to flush stream read buffer.

Overrides: EngineClient.EngineClient._flush_read

_handle_read(self, sname)

source code 

Handle a read notification. Called by the engine as the result of an event indicating that a read is available.

Overrides: EngineClient.EngineClient._handle_read