Пример #1
0
    def __init__(self,logger,dbname="aCTjobs.db"):
        aCTDB.__init__(self, logger, dbname)

        conf = aCTConfig.aCTConfigARC()
        self.proxydir = conf.get(["voms","proxystoredir"])
                
        # mapping from Job class attribute types to column types
        self.jobattrmap = {int: 'integer',
                      str: 'varchar(255)',
                      arc.JobState: 'varchar(255)',
                      arc.StringList: 'varchar(1024)',
                      arc.URL: 'varchar(255)',
                      arc.Period: 'int',
                      arc.Time: 'datetime',
                      arc.StringStringMap: 'varchar(1024)'}
        ignoremems=['STDIN',
                    'STDOUT',
                    'STDERR',
                    'STAGEINDIR',
                    'STAGEOUTDIR',
                    'SESSIONDIR',
                    'JOBLOG',
                    'JOBDESCRIPTION',
                    'JobDescriptionDocument']
        
        # Attributes of Job class mapped to DB column type
        self.jobattrs={}
        j=arc.Job()
        for i in dir(j):
            if re.match('^__',i):
                continue
            if i in ignoremems:
                continue
            if type(getattr(j, i)) in self.jobattrmap:
                self.jobattrs[i] = type(getattr(j, i))
Пример #2
0
    def __init__(self, logger=logging.getLogger(__name__)):
        """
        Initialize base object.

        Args:
            logger: An object for logging.
        """
        aCTDB.__init__(self, logger, "clientjobs")
Пример #3
0
 def __init__(self, log):
     aCTDB.__init__(self, log, 'pandajobs')
Пример #4
0
 def __init__(self, log):
     aCTDB.__init__(self, log, 'condorjobs')
Пример #5
0
 def __init__(self, log):
     aCTDB.__init__(self, log, 'ldmxjobs')