TaskAnalyzer is a class for analyzing the files of a given task.
Definition at line 607 of file TaskManager.py.
◆ __init__()
def python.TaskManager.TaskAnalyzer.__init__ |
( |
|
self, |
|
|
|
jobDir, |
|
|
|
dsName, |
|
|
|
taskName |
|
) |
| |
Definition at line 610 of file TaskManager.py.
610 def __init__(self,jobDir,dsName,taskName):
613 self.taskName = taskName
614 self.path = jobDir+
'/'+dsName+
'/'+taskName
616 self.status = TaskManager.StatusCodes[
'UNKNOWN']
617 self.onDisk = TaskManager.OnDiskCodes[
'UNKNOWN']
618 self.nResultFiles = 0
620 self.nJobsSubmitted = 0
621 self.nJobsRunning = 0
622 self.nJobsPostProc = 0
624 self.nJobsCompleted = 0
◆ analyzeFiles()
def python.TaskManager.TaskAnalyzer.analyzeFiles |
( |
|
self | ) |
|
Definition at line 635 of file TaskManager.py.
635 def analyzeFiles(self):
636 onDisk = self.isOnDisk()
638 self.nJobs = len(glob.glob(self.path+
'/*/*.config.py'))
639 self.nResultFiles = len(glob.glob(self.path+
'/*')) - self.nJobs
640 self.nJobsSubmitted = len(glob.glob(self.path+
'/*/*.SUBMITTED'))
641 self.nJobsRunning = len(glob.glob(self.path+
'/*/*.RUNNING'))
642 self.nJobsPostProc = len(glob.glob(self.path+
'/*/*.POSTPROCESSING'))
643 self.nJobsCompleted = len(glob.glob(self.path+
'/*/*.COMPLETED'))
644 self.nJobsFailed = self.nJobsCompleted - len(glob.glob(self.path+
'/*/*.exit.0'))
646 self.status = TaskManager.StatusCodes[
'UNKNOWN']
648 self.status = TaskManager.StatusCodes[
'CONFIGURED']
649 if self.nJobs==self.nJobsCompleted:
650 self.status = TaskManager.StatusCodes[
'COMPLETED']
652 if self.nJobsSubmitted>0:
653 self.status = TaskManager.StatusCodes[
'SUBMITTED']
654 if self.nJobsRunning>0:
655 self.status = TaskManager.StatusCodes[
'RUNNING']
656 if self.nJobsPostProc>0:
657 self.status = TaskManager.StatusCodes[
'POSTPROCESSING']
658 if self.nJobsFailed>0:
659 if self.nJobsSubmitted>0
or self.nJobsRunning>0
or self.nJobsPostProc>0:
660 self.status = TaskManager.StatusCodes[
'PARTIALFAILED']
662 self.status = TaskManager.StatusCodes[
'FAILED']
◆ isOnDisk()
def python.TaskManager.TaskAnalyzer.isOnDisk |
( |
|
self | ) |
|
Check if task directories are still on disk.
Definition at line 627 of file TaskManager.py.
628 """Check if task directories are still on disk."""
629 onDisk = os.path.exists(self.path)
631 self.onDisk = TaskManager.OnDiskCodes[
'DELETED']
◆ updateStatus()
def python.TaskManager.TaskAnalyzer.updateStatus |
( |
|
self, |
|
|
|
taskman |
|
) |
| |
Definition at line 667 of file TaskManager.py.
667 def updateStatus(self,taskman):
668 taskman.updateStatus(self.dsName,self.taskName,
669 self.status,self.nResultFiles,
670 self.nJobs,self.nJobsSubmitted,self.nJobsRunning,self.nJobsPostProc,self.nJobsFailed,self.nJobsCompleted)
◆ dsName
python.TaskManager.TaskAnalyzer.dsName |
◆ jobDir
python.TaskManager.TaskAnalyzer.jobDir |
◆ nJobs
python.TaskManager.TaskAnalyzer.nJobs |
◆ nJobsCompleted
python.TaskManager.TaskAnalyzer.nJobsCompleted |
◆ nJobsFailed
python.TaskManager.TaskAnalyzer.nJobsFailed |
◆ nJobsPostProc
python.TaskManager.TaskAnalyzer.nJobsPostProc |
◆ nJobsRunning
python.TaskManager.TaskAnalyzer.nJobsRunning |
◆ nJobsSubmitted
python.TaskManager.TaskAnalyzer.nJobsSubmitted |
◆ nResultFiles
python.TaskManager.TaskAnalyzer.nResultFiles |
◆ onDisk
python.TaskManager.TaskAnalyzer.onDisk |
◆ path
python.TaskManager.TaskAnalyzer.path |
◆ status
python.TaskManager.TaskAnalyzer.status |
◆ taskName
python.TaskManager.TaskAnalyzer.taskName |
The documentation for this class was generated from the following file: