Package schrodinger :: Package test :: Package stu :: Module run :: Class TestSPJob
[hide private]
[frames] | no frames]

Class TestSPJob

                   object --+        
                            |        
            job.queue.BaseJob --+    
                                |    
               object --+       |    
                        |       |    
job.queue.RequirementsJob --+   |    
                            |   |    
       job.queue.LocalhostJob --+    
                                |    
          job.queue.SubprocessJob --+
                                    |
                       object --+   |
                                |   |
                          TestJob --+
                                    |
                                   TestSPJob

Like a normal SubprocessJob job, but:

   - Ignore failures to launch.
   - Kill subjobs when killing this job.
   - Be aware of scriptID.
   - Access job duration and status.
Instance Methods [hide private]
 
__init__(self, command, command_dir=None, test_id=None, test=None, timeout=None, **kwargs)
Overridden to add the test_id.
None
preCommand(self, *args, **kwargs)
Overridden to open standard files for recording standard error and standard out.
None
doCommand(self, *args, **kwargs)
Overridden to ignore errors.
None
update(self)
Overridden to ignore errors.
None
cleanUp(self)
Close standard files for recording standard error and standard out.
tuple
getStatusStrings(self)
Return a tuple of status strings for printing by JobDJ.
 
kill(self)
First, kill children, then myself

Inherited from job.queue.SubprocessJob: __getstate__

Inherited from job.queue.SubprocessJob (private): _endJob

Inherited from job.queue.BaseJob: __lt__, addFinalizer, addGroupPrereq, addPrereq, finalize, genAllJobs, genAllPrereqs, getCommandDir, getJobDJ, getPrereqs, hasStarted, isComplete, maxFailuresReached, postCommand, run, runsLocally, setup

Inherited from job.queue.BaseJob (private): _getState, _pruneGraph, _setState

Inherited from job.queue.LocalhostJob: getRequirements

Inherited from TestJob: debugStatus, infoStatus, setupTestEnvironment, warnStatus

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

Class Variables [hide private]

Inherited from job.queue.BaseJob: init_count

Inherited from job.queue.LocalhostJob: requirement

Instance Variables [hide private]
  _test_id
The test number in the database (or the directory name in validate mode.
  _duration
Duration of the job, measured in TestSPJob.run.
Properties [hide private]
str exit_status
Exit status of the job, according to subprocess.

Inherited from job.queue.BaseJob: state

Inherited from TestJob: duration, is_done, test_id

Inherited from object: __class__

Method Details [hide private]

__init__(self, command, command_dir=None, test_id=None, test=None, timeout=None, **kwargs)
(Constructor)

 

Overridden to add the test_id.

Parameters:
  • command (list) - Command to be run.
  • command_dir (str) - Directory to run in.
  • test_id (int or str) - Unique identifier of script.
Overrides: object.__init__

preCommand(self, *args, **kwargs)

 

Overridden to open standard files for recording standard error and standard out. Also marks the start time of the job.

Returns: None
Overrides: job.queue.BaseJob.preCommand

doCommand(self, *args, **kwargs)

 

Overridden to ignore errors. Executes the command described by self._command.

Returns: None
Overrides: job.queue.BaseJob.doCommand

update(self)

 

Overridden to ignore errors. Updates the known status of a job.

Returns: None
Overrides: job.queue.BaseJob.update

getStatusStrings(self)

 

Return a tuple of status strings for printing by JobDJ.

Returns: tuple
(status, jobid, host)
Overrides: job.queue.BaseJob.getStatusStrings

kill(self)

 

First, kill children, then myself

Overrides: job.queue.SubprocessJob.kill

Property Details [hide private]

exit_status

Exit status of the job, according to subprocess. Implemented as a property to provide consistent interface with TestJCJob.

Get Method:
unreachable.exit_status(self) - Exit status of the job, according to subprocess.
Type:
str