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

Class TestJobDJ

     object --+    
              |    
job.queue.JobDJ --+
                  |
                 TestJobDJ

A flavor of JobDJ that takes a list of host entries (jobcontrol.Host objects) and lets the caller schedule exactly one job per entry.

Create an instance of this class, add the jobs, and call run().

Instance Methods [hide private]
 
__init__(self, entries, basedir='/scr/buildbot/savedbuilds/NB/2016-4/build-126/mmshare-v3.6/py..., *args, **kwargs)
Constructor.
 
basedir(self)
 
entryByName(self, name)
 
_availableHost(self, procs)
After getting an available host, delete it from the host pool.
 
_checkSubmitted(self, job)
We need to disable rescheduling queue jobs to non-queue hosts, which the original JobDJ does in this method
 
completedJobids(self)
The jobids of all jobs that have completed (with success or failure)

Inherited from job.queue.JobDJ: __setstate__, addJob, disableSmartDistribution, dump, getActiveProcCounts, hasStarted, isComplete, killJobs, markForRestart, printStatus, run, setHostList, updatedJobs

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

Properties [hide private]

Inherited from job.queue.JobDJ: active_jobs, all_jobs, done_jobs, failed_jobs, total_active, total_added, total_failed, total_finished, waiting_jobs

Inherited from job.queue.JobDJ (private): _host_list

Inherited from object: __class__

Method Details [hide private]

__init__(self, entries, basedir='/scr/buildbot/savedbuilds/NB/2016-4/build-126/mmshare-v3.6/py..., *args, **kwargs)
(Constructor)

 

Constructor.

Parameters:
  • hosts - A host list specification. To convert a string representation from -HOST to a list, use the jobcontrol.host_str_to_list() function. If no hosts argument is specified, the hosts will be read from the job control SCHRODINGER_NODEFILE environment variable.
  • local - If True, then all jobs will run with -LOCAL. Default is False.
  • max_retries - Number of allowed retries per subjob. If this is set, it is never overridden by the SCHRODINGER_MAX_RETRIES environment variable. If it is not set, the value in default_max_retries is used, and SCHRODINGER_MAX_RETRIES is allowed to override. If you wish to disable restarting altogether, set this value to zero.
  • default_max_retries - Number of allowed retries per subjob. This value can always be overridden by the SCHRODINGER_MAX_RETRIES environment variable. Default is zero.
  • max_failures - Total number of allowed subjob failures before JobDJ exits. If it is not defined, a default of zero will be used (exit on any failure after attempting to restart), but this can be overridden with the SCHRODINGER_MAX_FAILURES environment variable. To allow an unlimited number of subjob failures, set max_failures to the module level NOLIMIT constant.
  • verbosity - There are three allowed verbosity levels: "quiet" - only warnings and errors are printed; "normal" - JobDJ progress is printed; and "verbose" - additional debugging info is printed. Default is "quiet".
  • job_class - The class to use as the default job constructor when the addJob argument is not a BaseJob instance.
  • update_delay - The number of seconds to wait between job control database reads for JobControlJob jobs. (This delay is for an individual job, not for any job database read.) Default is None, which causes the module level constant UPDATE_DELAY to be used.
Overrides: object.__init__
(inherited documentation)

_availableHost(self, procs)

 

After getting an available host, delete it from the host pool. This way, no more than one job per host will be scheduled.

Parameters:
  • required_props - Number of processors that this subjobs will use.
Overrides: job.queue.JobDJ._availableHost

_checkSubmitted(self, job)

 

We need to disable rescheduling queue jobs to non-queue hosts, which the original JobDJ does in this method

Overrides: job.queue.JobDJ._checkSubmitted