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:

Instance Methods [hide private]
 
__init__(self, command, command_dir, test_id=None, timeout=None, **kwargs)
Overridden to add the test_id.
 
doCommand(self, host, local)
Overridden to ignore errors.
 
update(self)
Update the job.

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

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: report_status, set_license_check_file

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, 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__

doCommand(self, host, local)

 

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

update(self)

 

Update the job. Includes timeout logic.

Overrides: job.queue.BaseJob.update

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.
Type:
str