| Trees | Indices | Help |
|
|---|
|
|
The PyCmdDispatcher class is used by qube python jobtypes to execute commands through an abstracted application or shell.
The jobtype can have several sets of commands, defined as either a list of strings or a single string, for job setup, job teardown, and per-agendaItem commands.
Commands are sent as string to the child process via stdin. The child is responsible for communicating the success/failure of the command over a FIFO-like object known as the backChannel. A successful command execution results in a zero being written to the backChannel by the child. A non-zero indicates some sort of an error occurred attempting to execute the command.
In the case of a python child process, failure is defined as any command that raises an uncaught exception. The traceback is passed as a string from the child to the parent to be printed to sys.stderr.
|
|||
|
|||
|
|||
| int |
|
||
tuple
|
|
||
|
|||
int
|
|
||
| int |
|
||
|
Inherited from |
|||
|
|||
| PFXSimpleSocketServer |
backChannel The "out of band" pipe used to communicate success/failure from the PyCmdExecutor to the PyCmdDispatcher; distinct from the PyCmdExecutor's stdout/stderr, avoids having to parse the child's stdout/stderr for a sign that the last-sent command has completed executing. |
||
| subprocess.Popen |
child The running child process, which will contain a PyCmdExecutor instance. |
||
|
|||
|
Inherited from |
|||
|
|||
init function to set up members of the class
|
Send a string to the child process's stdin.
|
Read the first 4 bytes from the PFXSimpleServer's buffer; the first 4 bytes which are expected to contain the payload length as an integer in a packed format. Retrieve the message
|
Start up a child process, which will actually do the work for the job.
|
Pass the commands in a list to a child process one by one for
execution by
|
Signal the child process to shut down.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Apr 17 10:45:10 2017 | http://epydoc.sourceforge.net |