Package schrodinger :: Package utils :: Module installation_check :: Class TestJob
[hide private]
[frames] | no frames]

Class TestJob

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

A flavor of JobControlJob to be used with TestJobDJ. Its command line will be determined when run() is called on it, by setup(); the job will get named after the host entry that it gets to run on.

Instance Methods [hide private]
 
__init__(self, command_dir=None, duration=10, timeout=None)
Job constructor.
 
doCommand(self, host, local)
Launch job on specified host using jobcontrol.launch_job().
 
run(self, host, local)
Run the job.
 
formCommand(self, entry)
Generate a command line appropriate for a given host entry

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

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

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

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

Properties [hide private]

Inherited from job.queue.BaseJob: state

Inherited from object: __class__

Method Details [hide private]

__init__(self, command_dir=None, duration=10, timeout=None)
(Constructor)

 

Job constructor.

Parameters:
  • command_dir (str) - The launch directory of the job
  • duration (int) - The duration of the (testapp) job
  • timeout (int) - Timeout (in seconds) after which the job will be killed. If None, the job is allowed to run indefinitely.
Overrides: object.__init__

doCommand(self, host, local)

 

Launch job on specified host using jobcontrol.launch_job(). The -LOCAL flag is added to the job invocation command if local is True.

Parameters:
  • host - Host on which the job will be executed.
  • local - Should "-LOCAL" be appended to the command?
Overrides: job.queue.BaseJob.doCommand
(inherited documentation)

run(self, host, local)

 

Run the job.

The steps taken are as follows:

  1. Execute the preCommand method for things like changing the working directory.
  2. Call the doCommand to do the actual work of computation or job launching.
  3. Call the postCommand method to undo the changes from the preCommand that need to be undone.
Overrides: job.queue.BaseJob.run
(inherited documentation)