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

Class WorkerSimple

source code


WorkerSimple base class [DEPRECATED]

Implements a simple Worker to manage common process stdin/stdout/stderr streams.

[DEPRECATED] use StreamWorker.

Instance Methods [hide private]
 
__init__(self, file_reader, file_writer, file_error, key, handler, stderr=False, timeout=-1, autoclose=False, closefd=True, client_class=<class ClusterShell.Worker.Worker.StreamClient at 0x1eba050>)
Initialize WorkerSimple worker.
source code
 
error_fileno(self)
Return the standard error reader file descriptor (integer).
source code
 
reader_fileno(self)
Return the reader file descriptor (integer).
source code
 
writer_fileno(self)
Return the writer file descriptor as an integer.
source code
 
last_read(self)
Get last read message.
source code
 
last_error(self)
Get last error message.
source code
 
error(self)
Read worker error buffer.
source code
 
_on_start(self, key)
Called on command start.
source code
 
_on_rc(self, key, rc)
Command return code received.
source code
 
_on_written(self, key, bytes_count, sname)
Notification of bytes written.
source code

Inherited from StreamWorker: abort, read, set_key, set_reader, set_write_eof, set_writer, write

Inherited from StreamWorker (private): _engine_clients, _on_msgline, _on_timeout

Inherited from Worker: did_timeout, flush_buffers, flush_errors

Inherited from Worker (private): _set_task, _task_bound_check

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from Worker: SNAME_STDERR, SNAME_STDIN, SNAME_STDOUT

Instance Variables [hide private]

Inherited from Worker: current_errmsg, current_msg, current_node, current_rc, current_sname, eh, started, task

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, file_reader, file_writer, file_error, key, handler, stderr=False, timeout=-1, autoclose=False, closefd=True, client_class=<class ClusterShell.Worker.Worker.StreamClient at 0x1eba050>)
(Constructor)

source code 

Initialize WorkerSimple worker.

Overrides: object.__init__

last_read(self)

source code 

Get last read message.

[DEPRECATED] use current_msg

Overrides: Worker.last_read

last_error(self)

source code 

Get last error message.

[DEPRECATED] use current_errmsg

Overrides: Worker.last_error

_on_start(self, key)

source code 

Called on command start.

Overrides: Worker._on_start

_on_rc(self, key, rc)

source code 

Command return code received.

Overrides: Worker._on_rc

_on_written(self, key, bytes_count, sname)

source code 

Notification of bytes written.

Overrides: Worker._on_written