def make_worker(self, jobspec_list, queue_config, resource_type):
        tmpLog = self.make_logger(baseLogger, method_name='make_worker')
        workSpec = WorkSpec()
        self.nJobsPerWorker = len(jobspec_list)
        tmpLog.info("Worker for {0} jobs will be prepared".format(self.nJobsPerWorker))
        if self.nJobsPerWorker > 0:

            workSpec.nCore = int(queue_config.submitter['nCorePerNode']) * self.nJobsPerWorker
            workSpec.minRamCount = 0
            workSpec.maxDiskCount = 0
            workSpec.maxWalltime = 0
            if queue_config.walltimeLimit:
                workSpec.maxWalltime = queue_config.walltimeLimit
                tmpLog.debug("Wall time limit for worker: {0}".format(workSpec.maxWalltime))
            for jobSpec in jobspec_list:
                try:
                    workSpec.minRamCount = max(workSpec.minRamCount, jobSpec.jobParams['minRamCount'])
                except Exception:
                    pass
                try:
                    workSpec.maxDiskCount += jobSpec.jobParams['maxDiskCount']
                except Exception:
                    pass
                # try:  we should not relay on job parameters yet (not relaible)
                #     if jobSpec.jobParams['maxWalltime'] not in (None, "NULL"):
                #         workSpec.maxWalltime = max(workSpec.maxWalltime, jobSpec.jobParams['maxWalltime'])
                # except Exception:
                #     pass

            workSpec.workParams = self._get_executable(queue_config)

        return workSpec
    def make_worker(self, jobspec_list, queue_config, resource_type):
        tmpLog = core_utils.make_logger(baseLogger,
                                        'queue={0}'.format(
                                            queue_config.queueName),
                                        method_name='make_worker')

        tmpLog.info("Multi node worker preparation started.")
        tmpLog.info("Worker size: {0} jobs on {2} nodes for {1} sec.".format(
            self.nJobsPerWorker, self.walltimelimit, self.nNodes))

        workSpec = WorkSpec()
        workSpec.nCore = self.nNodes * queue_config.submitter['nCorePerNode']
        workSpec.minRamCount = 0
        workSpec.maxDiskCount = 0
        workSpec.maxWalltime = self.walltimelimit
        workSpec.workParams = self._get_executable()

        if len(jobspec_list) > 0:
            # push case: we know the job and set the parameters of the job
            for jobSpec in jobspec_list:
                try:
                    workSpec.minRamCount += jobSpec.jobParams['minRamCount']
                except Exception:
                    pass
                try:
                    workSpec.maxDiskCount += jobSpec.jobParams['maxDiskCount']
                except Exception:
                    pass
                #try:
                #    if jobSpec.jobParams['maxWalltime'] not in (None, "NULL"):
                #        workSpec.maxWalltime = max(int(queue_config.walltimeLimit), jobSpec.jobParams['maxWalltime'])
                #    else:
                #        workSpec.maxWalltime = queue_config.walltimeLimit
                #except Exception:
                #    pass
        tmpLog.info(
            "Worker for {0} nodes with {2} jobs with walltime {1} sec. defined"
            .format(self.nNodes, workSpec.maxWalltime, self.nJobsPerWorker))

        return workSpec
    def make_worker(self, jobspec_list, queue_config, resource_type):
        tmpLog = core_utils.make_logger(baseLogger, 'queue={0}'.format(queue_config.queueName),
                                        method_name='make_worker')

        tmpLog.info("Multi node worker preparation started.")
        tmpLog.info("Worker size: {0} jobs on {2} nodes for {1} sec.".format(self.nJobsPerWorker, self.walltimelimit,
                                                                                  self.nNodes))

        workSpec = WorkSpec()
        workSpec.nCore = self.nNodes * queue_config.submitter['nCorePerNode']
        workSpec.minRamCount = 0
        workSpec.maxDiskCount = 0
        workSpec.maxWalltime = self.walltimelimit
        workSpec.workParams = self._get_executable()

        if len(jobspec_list) > 0:
            # push case: we know the job and set the parameters of the job
            for jobSpec in jobspec_list:
                try:
                    workSpec.minRamCount += jobSpec.jobParams['minRamCount']
                except Exception:
                    pass
                try:
                    workSpec.maxDiskCount += jobSpec.jobParams['maxDiskCount']
                except Exception:
                    pass
                #try:
                #    if jobSpec.jobParams['maxWalltime'] not in (None, "NULL"):
                #        workSpec.maxWalltime = max(int(queue_config.walltimeLimit), jobSpec.jobParams['maxWalltime'])
                #    else:
                #        workSpec.maxWalltime = queue_config.walltimeLimit
                #except Exception:
                #    pass
        tmpLog.info("Worker for {0} nodes with {2} jobs with walltime {1} sec. defined".format(self.nNodes,
                                                                                             workSpec.maxWalltime,
                                                                                             self.nJobsPerWorker))

        return workSpec
    def make_worker(self, jobspec_list, queue_config, resource_type):
        tmpLog = self.make_logger(baseLogger, method_name='make_worker')
        workSpec = WorkSpec()
        self.nJobsPerWorker = len(jobspec_list)
        tmpLog.info("Worker for {0} jobs will be prepared".format(
            self.nJobsPerWorker))
        if self.nJobsPerWorker > 0:

            workSpec.nCore = int(
                queue_config.submitter['nCorePerNode']) * self.nJobsPerWorker
            workSpec.minRamCount = 0
            workSpec.maxDiskCount = 0
            workSpec.maxWalltime = 0
            if queue_config.walltimeLimit:
                workSpec.maxWalltime = queue_config.walltimeLimit
                tmpLog.debug("Wall time limit for worker: {0}".format(
                    workSpec.maxWalltime))
            for jobSpec in jobspec_list:
                try:
                    workSpec.minRamCount = max(
                        workSpec.minRamCount, jobSpec.jobParams['minRamCount'])
                except:
                    pass
                try:
                    workSpec.maxDiskCount += jobSpec.jobParams['maxDiskCount']
                except:
                    pass
                #try:  we should not relay on job parameters yet (not relaible)
                #    if jobSpec.jobParams['maxWalltime'] not in (None, "NULL"):
                #        workSpec.maxWalltime = max(workSpec.maxWalltime, jobSpec.jobParams['maxWalltime'])
                #except:
                #    pass

            workSpec.workParams = self._get_executable(queue_config)

        return workSpec