ATLAS Offline Software
Namespaces | Functions | Variables
taskman.py File Reference

Go to the source code of this file.

Namespaces

 taskman
 

Functions

def taskman.getTaskManager (dbconn=None)
 

Variables

string taskman.__author__ = 'Juerg Beringer'
 
string taskman.__version__ = 'taskman.py atlas/athena'
 
string taskman.__usage__
 
 taskman.parser = OptionParser(usage=__usage__, version=__version__)
 
 taskman.dest
 
 taskman.action
 
 taskman.default
 
 taskman.False
 
 taskman.help
 
 taskman.None
 
 taskman.options
 
 taskman.args
 
 taskman.cmd = args[0]
 
 taskman.cmdargs = args[1:]
 
 taskman.proddir = options.proddir
 
 taskman.dbtype
 
 taskman.dbname
 
 taskman.a = raw_input('\nRECREATING TASK DATABASE SCHEMA - ANY EXISTING DATA WILL BE ERASED!\n\nARE YOU REALLY ABSOLUTELY SURE [n] ? ')
 
 taskman.dbconn
 
 taskman.createDatabase
 
 taskman.dbfile
 
 taskman.status = TaskManager.StatusCodes.get(statusName)
 
 taskman.output
 
int taskman.nDuplicates = 0
 
 taskman.qual = []
 
 taskman.dsname = cmdargs[0]
 
 taskman.taskname = cmdargs[1]
 
 taskman.taskList
 
 taskman.taskEntry = taskman.getTaskDict(t[0], t[1])
 
 taskman.taskpath = os.path.join(proddir, dsname, taskname)
 
list taskman.dirs = []
 
 taskman.dsName
 
 taskman.taskName
 
 taskman.nDefined
 
 taskman.configFile = glob.glob(os.path.join(proddir, dsName, taskName, '*', '*.config.py'))
 
 taskman.mtime = os.stat(configFile[0])[stat.ST_MTIME]
 
dictionary taskman.config = {}
 
dictionary taskman.template = config['jobConfig']['joboptionpath']
 
dictionary taskman.release = config['jobConfig']['release']
 
dictionary taskman.taskpostprocsteps = config['jobConfig']['taskpostprocsteps']
 
dictionary taskman.comment = config['jobConfig']['comment'] + ' (rebuilt from config file)'
 
 taskman.createdTime
 
 taskman.createdUser
 
 taskman.createdHost
 
 taskman.fromDbconn = cmdargs[0]
 
 taskman.wildcards = string.maketrans('*?', '%_')
 
 taskman.destDbtype
 
 taskman.destDbname
 
 taskman.fromDbtype
 
 taskman.fromDbname
 
int taskman.nImported = 0
 
string taskman.links = ''
 
 taskman.files = t.get('RESULTFILES','')
 
 taskman.summaryFiles = glob.glob('%s/%s/*beamspot.gif' % (dsname,taskname))
 
 taskman.f = r.split('/')[-1]
 
string taskman.pdf = f[:-3]+'pdf'
 
 taskman.monitoringFiles = glob.glob('%s/%s/*beamspotmon.gif' % (dsname,taskname))
 
string taskman.fieldNameString = ''
 
list taskman.params = []
 
 taskman.newFieldName = fieldName
 
list taskman.q = [ 'insert into TASKS (%s) values (' % fieldNameString ]
 
 taskman.statusName = cmdargs[2].upper()
 
int taskman.n = 0
 
 taskman.fieldName = cmdargs[2].upper()
 
 taskman.fieldValue = cmdargs[3]
 
 taskman.requireSingleTask
 
 taskman.confirmWithUser
 
 taskman.addWildCards
 
 taskman.batch
 
 taskman.True
 
string taskman.dir = '/'.join([proddir,dsname,task])
 
 taskman.earliestUpdateTime = time.time()-float(args[1])
 
 taskman.dsWidth = len(max([t['DSNAME'] for t in taskList],key=len))
 
 taskman.taskWidth = len(max([t['TASKNAME'] for t in taskList],key=len))
 
 taskman.statusWidth = len(max([t['STATUS'] for t in taskList],key=len))
 
string taskman.bodyFormat = '%%(DSNAME)%ss %%(TASKNAME)%ss %%(STATUS)%ss' %(dsWidth, taskWidth, statusWidth)
 
string taskman.mailBody = 'The following %s tasks have reported failures' % len(taskList)
 
 taskman.hours = round(float(args[1])/3600.)
 
int taskman.stat = os.system('source /afs/cern.ch/user/a/atlidbs/cron/mailwrapper; mailwrapper "[atlidbs] %s tasks report failures" "%s"' %(len(taskList), mailBody)) >> 8
 
def taskman.taskman = getTaskManager()
 
 taskman.debug