Package schrodinger :: Package job :: Module queue :: Class SubprocessJob
[hide private]
[frames] | no frames]

Class SubprocessJob

         object --+    
                  |    
            BaseJob --+
                      |
     object --+       |
              |       |
RequirementsJob --+   |
                  |   |
       LocalhostJob --+
                      |
                     SubprocessJob

A job for running an external process. By default, stdout and stderr are collected and made available as the 'stdout' and 'stderr' attributes when the job is completed.

Instance Methods [hide private]
 
__init__(self, command, command_dir=None, stdout=-1, stderr=-1)
If stdout or stderr are expected to be large, you can pass an open file object instead of using PIPE.
 
__getstate__(self)
Return the state to be pickled.
 
update(self)
Update the current job status.
 
run(self, *args, **kwargs)
Run the command.

Inherited from BaseJob: __cmp__, addFinalizer, addGroupPrereq, addPrereq, cancelSubmitted, doCommand, finalize, genAllJobs, genAllPrereqs, getCommandDir, getJobDJ, getPrereqs, getStatusStrings, hasStarted, isComplete, maxFailuresReached, postCommand, preCommand, runsLocally, setup

Inherited from LocalhostJob: getRequirements

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

Class Variables [hide private]

Inherited from BaseJob: init_count

Inherited from LocalhostJob: requirement

Properties [hide private]

Inherited from BaseJob: state

Inherited from object: __class__

Method Details [hide private]

__init__(self, command, command_dir=None, stdout=-1, stderr=-1)
(Constructor)

 

If stdout or stderr are expected to be large, you can pass an open file object instead of using PIPE.

Parameters:
  • command_dir - The directory from which to run the command.
Overrides: object.__init__

update(self)

 

Update the current job status.

Overrides: BaseJob.update

run(self, *args, **kwargs)

 

Run the command.

Overrides: BaseJob.run