JobMinder
index
/local_disk/sherwood/RTT/Tools/RunTimeTester/RunTimeTester-00-00-10/src/JobMinder.py

This file contains:
a factory function   -   to create instances of sub classes of JobMinder
a base class         -   JobMinder
 
JobMinder acts like a state machine. It has states: queued, running, success, error,
it nows how to proceed from one state to the next, and species the actions to be
performed when the state changes. The way jobs are submited, and the names of
log files are examples of items that change with mode.
 
Subclassing is used to specialse according to mode.
 
The base class also specifies common tasks that must be performed across job mode
boundaries:
 
- database manipulations for jobs which store reference files
- various protection manipulations to allow other mebers of the same UNIX group
  to manipulate files on future runs.
- copying files to be stored at the end of the job
- actions to be taken of there is a forced shutdown
  (triggered by receiving a signal 15)
PS

 
Modules
            
anydbm
os
shutil
string
sys
 
Classes
            
JobMinder
LXBatchJobMinder
LinuxBatchJobMinder
LinuxInteractiveJobMinder
PBSJobMinder
LXBatchJobMinderFactory
LinuxBatchJobMinderFactory
LinuxInteractiveJobMinderFactory
PBSJobMinderFactory
 
class JobMinder
       
   Methods defined here:
__init__(self, jDescriptor, popen)
resDir     - results directory: recieves the logfile
status
copyKeepFiles(self)
# copy files to be kept (log histos, ntuples...) to results dir
forceCloseDown(self)
fromError(self)
fromQueued(self)
# subclasses to override this method
fromRunning(self)
# subclasses to override this method
fromSuccess(self)
performChecks(self)
poll(self)
makes status transitions
runPostScripts(self)
setProtection(self)
setProtections(self, path, perm)
setStatus(self, status)
# Do not set the status member data directly!
setStatusList(self, statusL)
storeRefFile(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'
lDbg = 1
 
class LXBatchJobMinder(JobMinder)
      JobMinder class for running on the LX batch queues
 
   Methods defined here:
__init__(self, jDescriptor, popen)
fromQueued(self)
Finds out from popen if queued on Interactive
stores the submission log
fromRunning(self)
getLogFile(self)

Data and non-method functions defined here:
__doc__ = '\n A JobMinder class for running on the LX batch queues\n '
__module__ = 'JobMinder'

Methods inherited from JobMinder:
copyKeepFiles(self)
# copy files to be kept (log histos, ntuples...) to results dir
forceCloseDown(self)
fromError(self)
fromSuccess(self)
performChecks(self)
poll(self)
makes status transitions
runPostScripts(self)
setProtection(self)
setProtections(self, path, perm)
setStatus(self, status)
# Do not set the status member data directly!
setStatusList(self, statusL)
storeRefFile(self)

Data and non-method functions inherited from JobMinder:
lDbg = 1
 
class LXBatchJobMinderFactory
       
   Methods defined here:
create(self, jDescriptor, popen)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'
 
class LinuxBatchJobMinder(JobMinder)
       
   Methods defined here:
__init__(self, jDescriptor, popen)
fromQueued(self)
Finds out from popen if queued on Interactive
stores the submission log
fromRunning(self)
Looks to see if the log has appeared
Checks it for errors when it appears

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'

Methods inherited from JobMinder:
copyKeepFiles(self)
# copy files to be kept (log histos, ntuples...) to results dir
forceCloseDown(self)
fromError(self)
fromSuccess(self)
performChecks(self)
poll(self)
makes status transitions
runPostScripts(self)
setProtection(self)
setProtections(self, path, perm)
setStatus(self, status)
# Do not set the status member data directly!
setStatusList(self, statusL)
storeRefFile(self)

Data and non-method functions inherited from JobMinder:
lDbg = 1
 
class LinuxBatchJobMinderFactory
       
   Methods defined here:
create(self, jDescriptor, popen)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'
 
class LinuxInteractiveJobMinder(JobMinder)
       
   Methods defined here:
__init__(self, jDescriptor, popen)
fromQueued(self)
Finds out from popen if queued on Interactive
stores the submission log
fromRunning(self)
Looks to see if the log has appeared
Checks it for errors when it appears

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'

Methods inherited from JobMinder:
copyKeepFiles(self)
# copy files to be kept (log histos, ntuples...) to results dir
forceCloseDown(self)
fromError(self)
fromSuccess(self)
performChecks(self)
poll(self)
makes status transitions
runPostScripts(self)
setProtection(self)
setProtections(self, path, perm)
setStatus(self, status)
# Do not set the status member data directly!
setStatusList(self, statusL)
storeRefFile(self)

Data and non-method functions inherited from JobMinder:
lDbg = 1
 
class LinuxInteractiveJobMinderFactory
       
   Methods defined here:
create(self, jDescriptor, popen)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'
 
class PBSJobMinder(JobMinder)
       
   Methods defined here:
__init__(self, jDescriptor, popen)
findLog(self)
Looks to see if the log has appeared
Checks it for errors when it appears
fromQueued(self)
Finds out from popen if queued on PBS
stores the submission log
fromRunning(self)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'

Methods inherited from JobMinder:
copyKeepFiles(self)
# copy files to be kept (log histos, ntuples...) to results dir
forceCloseDown(self)
fromError(self)
fromSuccess(self)
performChecks(self)
poll(self)
makes status transitions
runPostScripts(self)
setProtection(self)
setProtections(self, path, perm)
setStatus(self, status)
# Do not set the status member data directly!
setStatusList(self, statusL)
storeRefFile(self)

Data and non-method functions inherited from JobMinder:
lDbg = 1
 
class PBSJobMinderFactory
       
   Methods defined here:
create(self, jDescriptor, popen)

Data and non-method functions defined here:
__doc__ = None
__module__ = 'JobMinder'
 
Data
             __file__ = './JobMinder.py'
__name__ = 'JobMinder'