Ejemplo n.º 1
0
    def execute(self, id = None, file = None, conn = None, transaction = False, jobDict = None):

        #Adding jobDict activates bulk mode
        #Bulk mode expect jobDict of form {jid: fileid}

        if jobDict:
            binds = self.getBinds(jobDict)
        elif id and file:
            binds = DBFormatter.getBinds(self, jobid = id, fileid = file)
        else:
            logging.error('Jobs.AddFiles called with insufficient arguments')
            return

        self.dbi.processData(self.sql, binds, conn = conn,
                             transaction = transaction)
        return
Ejemplo n.º 2
0
    def execute(self, id = None, file = None, conn = None, transaction = False, jobDict = None):

        #Adding jobDict activates bulk mode
        #Bulk mode expect jobDict of form {jid: fileid}

        if jobDict:
            binds = self.getBinds(jobDict)
        elif id and file:
            binds = DBFormatter.getBinds(self, jobid = id, fileid = file)
        else:
            logging.error('Jobs.AddFiles called with insufficient arguments')
            return

        self.dbi.processData(self.sql, binds, conn = conn,
                             transaction = transaction)
        return
Ejemplo n.º 3
0
    def execute(self, jobid=None, fileid=None, run=None, lumi=None, jobFileRunLumis=None, conn=None, transaction=False):
        """
        Args:
            jobid: The id of a single job
            fileid: The id of a single file
            run: Run # for a single work unit
            lumi: Lumi # for a single work unit
            jobFileRunLumis: a list of tuples of the form [(jobid, fileid, run, lumi), ...]

        Returns: N/A
        """

        if jobFileRunLumis:
            binds = self.getBinds(jobFileRunLumis)
        elif jobid and fileid and run and lumi:
            binds = DBFormatter.getBinds(self, jobid=jobid, fileid=fileid, run=run, lumi=lumi)
        else:
            logging.error('Jobs.AddWorkUnits called with insufficient arguments')
            return

        self.dbi.processData(self.sql, binds, conn=conn, transaction=transaction)
        return
Ejemplo n.º 4
0
    def execute(self,
                jobid=None,
                fileid=None,
                run=None,
                lumi=None,
                jobFileRunLumis=None,
                conn=None,
                transaction=False):
        """
        Args:
            jobid: The id of a single job
            fileid: The id of a single file
            run: Run # for a single work unit
            lumi: Lumi # for a single work unit
            jobFileRunLumis: a list of tuples of the form [(jobid, fileid, run, lumi), ...]

        Returns: N/A
        """

        if jobFileRunLumis:
            binds = self.getBinds(jobFileRunLumis)
        elif jobid and fileid and run and lumi:
            binds = DBFormatter.getBinds(self,
                                         jobid=jobid,
                                         fileid=fileid,
                                         run=run,
                                         lumi=lumi)
        else:
            logging.error(
                'Jobs.AddWorkUnits called with insufficient arguments')
            return

        self.dbi.processData(self.sql,
                             binds,
                             conn=conn,
                             transaction=transaction)
        return