ATLAS Offline Software
Loading...
Searching...
No Matches
python.trfUtils.JobGroup Class Reference

JobGroup: a set of Job objects and pieces of information relevant to a given set of Job objects. More...

Inheritance diagram for python.trfUtils.JobGroup:
Collaboration diagram for python.trfUtils.JobGroup:

Public Member Functions

 __init__ (self, jobs=None, name=None, timeout=None)
 initialisation method
 name (self)
 __str__ (self)
 return an object self description string @ detail This method returns an object description string consisting of a listing of the items of the object self.
 timeoutStatus (self)
 return Boolean JobGroup timeout status
 printout (self)
 print in a human-readable way the items of the object self

Public Attributes

 jobs = jobs
 className = self.__class__.__name__
bool completeStatus = False
 timeStampSubmission = None
int timeout = 0
list results = []

Protected Attributes

 _name = uniqueIdentifier()

Detailed Description

JobGroup: a set of Job objects and pieces of information relevant to a given set of Job objects.

A JobGroup is a set of Job objects and pieces of information relevant to a given set of Job objects. A JobGroup object comprises a name, a list of Job objects, a timeout and, ultimately, an ordered list of result objects. The timeout can be speecified or derived from the summation of the timeout specifications of the set of Job objects.

Parameters
namethe JobGroup object name
jobsthe list of Job objects
timeoutthe JobGroup object timeout specification in seconds

Definition at line 789 of file trfUtils.py.

Constructor & Destructor Documentation

◆ __init__()

python.trfUtils.JobGroup.__init__ ( self,
jobs = None,
name = None,
timeout = None )

initialisation method

Definition at line 792 of file trfUtils.py.

797 ):
798 self.jobs = jobs
799 self.className = self.__class__.__name__
800 self.completeStatus = False
801 self.timeStampSubmission = None
802 if name is None:
803 self._name = uniqueIdentifier()
804 else:
805 self._name = name
806 #self.timeStampSubmissionComplete = None #delete
807 if timeout is None:
808 self.timeout = 0
809 for job in self.jobs:
810 self.timeout += job.workFunctionTimeout
811 self.results = []
812

Member Function Documentation

◆ __str__()

python.trfUtils.JobGroup.__str__ ( self)

return an object self description string @ detail This method returns an object description string consisting of a listing of the items of the object self.

Returns
object description string

Definition at line 821 of file trfUtils.py.

821 def __str__(self):
822 descriptionString = ""
823 for key, value in sorted(vars(self).items()):
824 descriptionString += str("{key}:{value} ".format(
825 key = key,
826 value = value)
827 )
828 return descriptionString
829

◆ name()

python.trfUtils.JobGroup.name ( self)

Definition at line 814 of file trfUtils.py.

814 def name(self):
815 return self._name
816

◆ printout()

python.trfUtils.JobGroup.printout ( self)

print in a human-readable way the items of the object self

This function prints in a human-readable way the items of the object self.

Definition at line 852 of file trfUtils.py.

852 def printout(self):
853 printHR(vars(self))
854
855

◆ timeoutStatus()

python.trfUtils.JobGroup.timeoutStatus ( self)

return Boolean JobGroup timeout status

This method returns the timeout status of a JobGroup object. If the JobGroup object has not timed out, the Boolean False is returned. If the JobGroup object has timed out, the Boolean True is returned. If the JobGroup object has been completed or is not submitted, the Boolean False is returned.

Returns
Boolean indicating the JobGroup timeout status

Definition at line 837 of file trfUtils.py.

837 def timeoutStatus(self):
838 # If the JobGroup is complete or not submitted, then it is not timed
839 # out.
840 if self.completeStatus is True or self.timeStampSubmission is None:
841 return False
842 # If the JobGroup is not complete or submitted, then it may be timed
843 # out.
844 elif time.time() > self.timeout + self.timeStampSubmission:
845 return True
846 else:
847 return False
848

Member Data Documentation

◆ _name

python.trfUtils.JobGroup._name = uniqueIdentifier()
protected

Definition at line 803 of file trfUtils.py.

◆ className

python.trfUtils.JobGroup.className = self.__class__.__name__

Definition at line 799 of file trfUtils.py.

◆ completeStatus

bool python.trfUtils.JobGroup.completeStatus = False

Definition at line 800 of file trfUtils.py.

◆ jobs

python.trfUtils.JobGroup.jobs = jobs

Definition at line 798 of file trfUtils.py.

◆ results

list python.trfUtils.JobGroup.results = []

Definition at line 811 of file trfUtils.py.

◆ timeout

int python.trfUtils.JobGroup.timeout = 0

Definition at line 808 of file trfUtils.py.

◆ timeStampSubmission

python.trfUtils.JobGroup.timeStampSubmission = None

Definition at line 801 of file trfUtils.py.


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