RHESSysCalibrator  2.1.0
Public Member Functions | Static Public Attributes | List of all members
rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess Class Reference

Class that implements consumer/worker thread behavior for the subprocess threading model. More...

Inheritance diagram for rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess:
rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner rhessyscalibrator.calibration_runner.CalibrationRunner

Public Member Functions

def __init__
 
def runJobInSubprocess (self, job)
 Run a job using subprocess. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by producer thread/process. More...
 
def __init__
 
def runJobInSubprocess (self, job)
 Run a job using subprocess. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by producer thread/process. More...
 
def __init__
 
def runJobInSubprocess (self, job)
 Run a job using subprocess. More...
 
def run (self)
 Method to be run in a consumer thread/process to launch a run submitted by producer thread/process. More...
 
- Public Member Functions inherited from rhessyscalibrator.calibration_runner.CalibrationRunner
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 
def __init__
 
def __del__ (self)
 
def run (self)
 
def storeJobInDB (self, job)
 Store new job in ModelRunnerDB2. More...
 
def jobCompleteCallback (self, args, kwargs)
 Called when a job is complete. More...
 

Static Public Attributes

int QUEUE_GET_TIMEOUT_SECS = 15
 
int INIT_SLEEP_SECS = 15
 
int JOB_STATUS_SLEEP_SECS = 60
 
int JOB_SUBMIT_PENDING_THRESHOLD_SLEEP_SECS = 90
 

Additional Inherited Members

- Public Attributes inherited from rhessyscalibrator.calibration_runner.CalibrationRunner
 basedir
 
 session_id
 
 queue
 
 db_path
 
 run_path
 
 logger
 
 restart_runs
 
 db
 
 numActiveJobs
 

Detailed Description

Class that implements consumer/worker thread behavior for the subprocess threading model.

Subclasses may override default implementation for self.jobCompleteCallback() if they wish to perform an action when a job is marked as complete.

Constructor & Destructor Documentation

def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs = False 
)
Parameters
basedirString representing the basedir of the calibration session
session_idInteger representing the session ID of current calibration session
queueReference to Queue.Queue representing dispatch queue shared with producer thread
db_pathString representing the path of sqlite DB to store the job (run) in
run_pathString representing the absolute path of the directory from which jobs should be run.
loggerlogging.Logger to use to for debug messages
restart_runsBoolean indicating that runs are to be restarted (i.e. do not insert new runs into DB)
def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs = False 
)
Parameters
basedirString representing the basedir of the calibration session
session_idInteger representing the session ID of current calibration session
queueReference to Queue.Queue representing dispatch queue shared with producer thread
db_pathString representing the path of sqlite DB to store the job (run) in
run_pathString representing the absolute path of the directory from which jobs should be run.
loggerlogging.Logger to use to for debug messages
restart_runsBoolean indicating that runs are to be restarted (i.e. do not insert new runs into DB)
def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.__init__ (   self,
  basedir,
  session_id,
  queue,
  db_path,
  run_path,
  logger,
  restart_runs = False 
)
Parameters
basedirString representing the basedir of the calibration session
session_idInteger representing the session ID of current calibration session
queueReference to Queue.Queue representing dispatch queue shared with producer thread
db_pathString representing the path of sqlite DB to store the job (run) in
run_pathString representing the absolute path of the directory from which jobs should be run.
loggerlogging.Logger to use to for debug messages
restart_runsBoolean indicating that runs are to be restarted (i.e. do not insert new runs into DB)

Member Function Documentation

def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.run (   self)

Method to be run in a consumer thread/process to launch a run submitted by producer thread/process.

def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.run (   self)

Method to be run in a consumer thread/process to launch a run submitted by producer thread/process.

def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.run (   self)

Method to be run in a consumer thread/process to launch a run submitted by producer thread/process.

def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.runJobInSubprocess (   self,
  job 
)

Run a job using subprocess.

Will add job to DB.

       @param job model_runner_db.ModelRun representing the job to run

       @raise Exception if bsub output is not what was expected
       @raise Exception if run to restart is not present
def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.runJobInSubprocess (   self,
  job 
)

Run a job using subprocess.

Will add job to DB.

       @param job model_runner_db.ModelRun representing the job to run

       @raise Exception if bsub output is not what was expected
       @raise Exception if run to restart is not present
def rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.runJobInSubprocess (   self,
  job 
)

Run a job using subprocess.

Will add job to DB.

       @param job model_runner_db.ModelRun representing the job to run

       @raise Exception if bsub output is not what was expected
       @raise Exception if run to restart is not present

Member Data Documentation

int rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.INIT_SLEEP_SECS = 15
static
int rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.JOB_STATUS_SLEEP_SECS = 60
static
int rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.JOB_SUBMIT_PENDING_THRESHOLD_SLEEP_SECS = 90
static
int rhessyscalibrator.calibration_runner.CalibrationRunnerSubprocess.QUEUE_GET_TIMEOUT_SECS = 15
static

The documentation for this class was generated from the following file: