ATLAS Offline Software
|
Functions | |
def | getTaskManager (dbconn=None) |
Variables | |
string | __author__ = 'Juerg Beringer' |
string | __version__ = 'taskman.py atlas/athena' |
string | __usage__ |
parser = OptionParser(usage=__usage__, version=__version__) | |
dest | |
action | |
default | |
False | |
help | |
None | |
options | |
args | |
cmd = args[0] | |
cmdargs = args[1:] | |
proddir = options.proddir | |
dbtype | |
dbname | |
a = raw_input('\nRECREATING TASK DATABASE SCHEMA - ANY EXISTING DATA WILL BE ERASED!\n\nARE YOU REALLY ABSOLUTELY SURE [n] ? ') | |
dbconn | |
createDatabase | |
dbfile | |
status = TaskManager.StatusCodes.get(statusName) | |
output | |
int | nDuplicates = 0 |
qual = [] | |
dsname = cmdargs[0] | |
taskname = cmdargs[1] | |
taskList | |
taskEntry = taskman.getTaskDict(t[0], t[1]) | |
taskpath = os.path.join(proddir, dsname, taskname) | |
list | dirs = [] |
dsName | |
taskName | |
nDefined | |
configFile = glob.glob(os.path.join(proddir, dsName, taskName, '*', '*.config.py')) | |
mtime = os.stat(configFile[0])[stat.ST_MTIME] | |
dictionary | config = {} |
dictionary | template = config['jobConfig']['joboptionpath'] |
dictionary | release = config['jobConfig']['release'] |
dictionary | taskpostprocsteps = config['jobConfig']['taskpostprocsteps'] |
dictionary | comment = config['jobConfig']['comment'] + ' (rebuilt from config file)' |
createdTime | |
createdUser | |
createdHost | |
fromDbconn = cmdargs[0] | |
wildcards = string.maketrans('*?', '%_') | |
destDbtype | |
destDbname | |
fromDbtype | |
fromDbname | |
int | nImported = 0 |
string | links = '' |
files = t.get('RESULTFILES','') | |
summaryFiles = glob.glob('%s/%s/*beamspot.gif' % (dsname,taskname)) | |
f = r.split('/')[-1] | |
string | pdf = f[:-3]+'pdf' |
monitoringFiles = glob.glob('%s/%s/*beamspotmon.gif' % (dsname,taskname)) | |
string | fieldNameString = '' |
list | params = [] |
newFieldName = fieldName | |
list | q = [ 'insert into TASKS (%s) values (' % fieldNameString ] |
statusName = cmdargs[2].upper() | |
int | n = 0 |
fieldName = cmdargs[2].upper() | |
fieldValue = cmdargs[3] | |
requireSingleTask | |
confirmWithUser | |
addWildCards | |
batch | |
True | |
string | dir = '/'.join([proddir,dsname,task]) |
earliestUpdateTime = time.time()-float(args[1]) | |
dsWidth = len(max([t['DSNAME'] for t in taskList],key=len)) | |
taskWidth = len(max([t['TASKNAME'] for t in taskList],key=len)) | |
statusWidth = len(max([t['STATUS'] for t in taskList],key=len)) | |
string | bodyFormat = '%%(DSNAME)%ss %%(TASKNAME)%ss %%(STATUS)%ss' %(dsWidth, taskWidth, statusWidth) |
string | mailBody = 'The following %s tasks have reported failures' % len(taskList) |
hours = round(float(args[1])/3600.) | |
int | 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 = getTaskManager() |
debug | |
def taskman.getTaskManager | ( | dbconn = None | ) |
|
private |
Definition at line 10 of file taskman.py.
|
private |
Definition at line 12 of file taskman.py.
|
private |
Definition at line 11 of file taskman.py.
taskman.a = raw_input('\nRECREATING TASK DATABASE SCHEMA - ANY EXISTING DATA WILL BE ERASED!\n\nARE YOU REALLY ABSOLUTELY SURE [n] ? ') |
Definition at line 97 of file taskman.py.
taskman.action |
Definition at line 48 of file taskman.py.
taskman.addWildCards |
Definition at line 502 of file taskman.py.
taskman.args |
Definition at line 56 of file taskman.py.
taskman.batch |
Definition at line 566 of file taskman.py.
string taskman.bodyFormat = '%%(DSNAME)%ss %%(TASKNAME)%ss %%(STATUS)%ss' %(dsWidth, taskWidth, statusWidth) |
Definition at line 646 of file taskman.py.
taskman.cmd = args[0] |
Definition at line 60 of file taskman.py.
taskman.cmdargs = args[1:] |
Definition at line 61 of file taskman.py.
Definition at line 329 of file taskman.py.
dictionary taskman.config = {} |
Definition at line 314 of file taskman.py.
Definition at line 311 of file taskman.py.
taskman.confirmWithUser |
Definition at line 501 of file taskman.py.
taskman.createDatabase |
Definition at line 100 of file taskman.py.
taskman.createdHost |
Definition at line 335 of file taskman.py.
taskman.createdTime |
Definition at line 333 of file taskman.py.
taskman.createdUser |
Definition at line 334 of file taskman.py.
taskman.dbconn |
Definition at line 100 of file taskman.py.
taskman.dbfile |
Definition at line 110 of file taskman.py.
taskman.dbname |
Definition at line 82 of file taskman.py.
taskman.dbtype |
Definition at line 82 of file taskman.py.
taskman.debug |
Definition at line 669 of file taskman.py.
taskman.default |
Definition at line 48 of file taskman.py.
taskman.dest |
Definition at line 48 of file taskman.py.
taskman.destDbname |
Definition at line 380 of file taskman.py.
taskman.destDbtype |
Definition at line 380 of file taskman.py.
Definition at line 570 of file taskman.py.
list taskman.dirs = [] |
Definition at line 284 of file taskman.py.
taskman.dsname = cmdargs[0] |
Definition at line 186 of file taskman.py.
taskman.dsName |
Definition at line 292 of file taskman.py.
Definition at line 642 of file taskman.py.
int taskman.earliestUpdateTime = time.time()-float(args[1]) |
Definition at line 625 of file taskman.py.
taskman.f = r.split('/')[-1] |
Definition at line 409 of file taskman.py.
taskman.False |
Definition at line 48 of file taskman.py.
Definition at line 492 of file taskman.py.
string taskman.fieldNameString = '' |
Definition at line 431 of file taskman.py.
taskman.fieldValue = cmdargs[3] |
Definition at line 493 of file taskman.py.
string taskman.files = t.get('RESULTFILES','') |
Definition at line 401 of file taskman.py.
taskman.fromDbconn = cmdargs[0] |
Definition at line 357 of file taskman.py.
taskman.fromDbname |
Definition at line 381 of file taskman.py.
taskman.fromDbtype |
Definition at line 381 of file taskman.py.
taskman.help |
Definition at line 48 of file taskman.py.
taskman.hours = round(float(args[1])/3600.) |
Definition at line 650 of file taskman.py.
string taskman.links = '' |
Definition at line 400 of file taskman.py.
string taskman.mailBody = 'The following %s tasks have reported failures' % len(taskList) |
Definition at line 648 of file taskman.py.
Definition at line 417 of file taskman.py.
taskman.mtime = os.stat(configFile[0])[stat.ST_MTIME] |
Definition at line 313 of file taskman.py.
int taskman.n = 0 |
Definition at line 478 of file taskman.py.
taskman.nDefined |
Definition at line 293 of file taskman.py.
int taskman.nDuplicates = 0 |
Definition at line 152 of file taskman.py.
string taskman.newFieldName = fieldName |
Definition at line 434 of file taskman.py.
int taskman.nImported = 0 |
Definition at line 391 of file taskman.py.
taskman.None |
Definition at line 53 of file taskman.py.
taskman.options |
Definition at line 56 of file taskman.py.
taskman.output |
Definition at line 118 of file taskman.py.
list taskman.params = [] |
Definition at line 432 of file taskman.py.
taskman.parser = OptionParser(usage=__usage__, version=__version__) |
Definition at line 46 of file taskman.py.
string taskman.pdf = f[:-3]+'pdf' |
Definition at line 410 of file taskman.py.
taskman.proddir = options.proddir |
Definition at line 63 of file taskman.py.
list taskman.q = [ 'insert into TASKS (%s) values (' % fieldNameString ] |
Definition at line 444 of file taskman.py.
list taskman.qual = [] |
Definition at line 158 of file taskman.py.
string taskman.release = config['jobConfig']['release'] |
Definition at line 321 of file taskman.py.
taskman.requireSingleTask |
Definition at line 500 of file taskman.py.
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 |
Definition at line 654 of file taskman.py.
taskman.status = TaskManager.StatusCodes.get(statusName) |
Definition at line 118 of file taskman.py.
Definition at line 461 of file taskman.py.
Definition at line 644 of file taskman.py.
Definition at line 406 of file taskman.py.
taskman.taskEntry = taskman.getTaskDict(t[0], t[1]) |
Definition at line 196 of file taskman.py.
list taskman.taskList |
Definition at line 191 of file taskman.py.
def taskman.taskman = getTaskManager() |
Definition at line 668 of file taskman.py.
string taskman.taskname = cmdargs[1] |
Definition at line 187 of file taskman.py.
taskman.taskName |
Definition at line 292 of file taskman.py.
Definition at line 274 of file taskman.py.
string taskman.taskpostprocsteps = config['jobConfig']['taskpostprocsteps'] |
Definition at line 325 of file taskman.py.
Definition at line 643 of file taskman.py.
string taskman.template = config['jobConfig']['joboptionpath'] |
Definition at line 317 of file taskman.py.
taskman.True |
Definition at line 566 of file taskman.py.
taskman.wildcards = string.maketrans('*?', '%_') |
Definition at line 366 of file taskman.py.