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

Class TestJCJob

         object --+        
                  |        
  job.queue.BaseJob --+    
                      |    
job.queue.JobControlJob --+
                          |
             object --+   |
                      |   |
                TestJob --+
                          |
                         TestJCJob

Like a normal JobControlJob, but:

   - Ignore failures to launch.
   - Be aware of scriptID.
   - Easily access job duration and exit status.
Instance Methods [hide private]
 
__init__(self, command, command_dir, test_id=None, test=None, timeout=None, runs_locally=False, **kwargs)
Overridden to add the test_id.
 
doCommand(self, host='localhost', local=False)
Overridden to ignore errors.
 
runsLocally(self)
Return True if the job runs on the JobDJ control host, False if not.

Inherited from job.queue.JobControlJob: __getstate__, __setstate__, __str__, cancelSubmitted, getCommand, getJob, getStatusStrings, kill, maxFailuresReached, retryFailure, update

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

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

Inherited from TestJob: debugStatus, infoStatus, setupTestEnvironment, warnStatus

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

Class Variables [hide private]

Inherited from job.queue.BaseJob: init_count

Instance Variables [hide private]
  _test_id
The test number in the database (or the directory name in validate mode.
Properties [hide private]
float duration
Duration of the job, according to the job record.
str exit_status
Exit status of the job, according to the job record.

Inherited from job.queue.BaseJob: state

Inherited from TestJob: is_done, test_id

Inherited from object: __class__

Method Details [hide private]

__init__(self, command, command_dir, test_id=None, test=None, timeout=None, runs_locally=False, **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.
  • test (TestScript object.) - The representation of all test data for the job that is being run.
  • timeout (int or None) - Duration in seconds after which to kill the job. None is never.
  • runs_locally (bool) - Should this job be launched on localhost (never remote hosts)?
Overrides: object.__init__

doCommand(self, host='localhost', local=False)

 

Overridden to ignore errors. Executes the command described by self._command. The parent class has two required arguments, but has the call signature doCommand(*args, **kwargs), hence its usage here.

Parameters:
  • args - Required by parent: host, local
  • kwargs - All ignored
Overrides: job.queue.BaseJob.doCommand

runsLocally(self)

 

Return True if the job runs on the JobDJ control host, False if not. Jobs that run locally don't need hosts.

There is no limit on the number of locally run jobs.

Overrides: job.queue.BaseJob.runsLocally
(inherited documentation)

Property Details [hide private]

duration

Duration of the job, according to the job record. Implemented as a property to provide consistent interface with TestSPJob. Also gives duration for RUNNING jobs, so as to be consistent with TestSPJob.

Get Method:
unreachable.duration(self) - Duration of the job, according to the job record.
Type:
float

exit_status

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

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