当前位置: 首页>>代码示例>>Python>>正文


Python Scheduler.__init__方法代码示例

本文整理汇总了Python中Scheduler.Scheduler.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Scheduler.__init__方法的具体用法?Python Scheduler.__init__怎么用?Python Scheduler.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Scheduler.Scheduler的用法示例。


在下文中一共展示了Scheduler.__init__方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
    def __init__(self, harness, params):
        Scheduler.__init__(self, harness, params)

        # json storage
        self.__session_data = {}

        # a set containing any launched jobs
        self.__jobs = set([])

        # Open existing session file
        if os.path.exists(self.options.session_file):
            self.__status_check = True
            try:
                self.__session_file = open(self.options.session_file, 'r+')
                self.__session_data = json.load(self.__session_file)

                # Set some important things that affect findAndRunTests (input file, --re)
                json_args = self.getData('QUEUEMANAGER',
                                         options_regexp=True,
                                         options_input=True)
                self.options.reg_exp = json_args['options_regexp']
                self.options.input_file_name = json_args['options_input']

            except ValueError:
                raise QueueManagerError('Supplied session file: %s exists, but is not readable!' % (self.options.session_file))

        # session file does not exists. Create one instead.
        else:
            self.__status_check = False
            self.__session_file = self.__createSessionFile()
            self.putData('QUEUEMANAGER',
                         options_regexp=self.options.reg_exp,
                         options_input=self.options.input_file_name)

        self.params = params
开发者ID:aeslaughter,项目名称:moose,代码行数:37,代码来源:QueueManager.py

示例2: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self, name):
     Scheduler.__init__(self,name)
     self.states = [ "Acl", "cancelReason", "cancelling","ce_node","children", \
                   "children_hist","children_num","children_states","condorId","condor_jdl", \
                   "cpuTime","destination", "done_code","exit_code","expectFrom", \
                   "expectUpdate","globusId","jdl","jobId","jobtype", \
                   "lastUpdateTime","localId","location", "matched_jdl","network_server", \
                   "owner","parent_job", "reason","resubmitted","rsl","seed",\
                   "stateEnterTime","stateEnterTimes","subjob_failed", \
                   "user tags" , "status" , "status_code","hierarchy"]
     return
开发者ID:PerilousApricot,项目名称:CRAB2,代码行数:13,代码来源:SchedulerGrid.py

示例3: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
    def __init__(self, portTypes = {} ):
        Scheduler.__init__(self)
        self.motors = { 'A': Motor(BP.PORT_A, self), 'B': Motor(BP.PORT_B, self), 'C': Motor(BP.PORT_C, self), 'D': Motor(BP.PORT_D, self) }
        self.sensors = {  }
        BP.BrickPiSetup()  # setup the serial port for communication

        for port, sensorType in portTypes.items():
            if isinstance(sensorType, int):
                sensor = Sensor(port, sensorType)
            else:
                sensor = sensorType(port)
            self.sensors[sensor.idChar] = sensor
            BP.BrickPi.SensorType[sensor.port] = sensor.type
        BP.BrickPiSetupSensors()       #Send the properties of sensors to BrickPi

        self.setUpdateCoroutine( self.updaterCoroutine() )
开发者ID:charlesweir,项目名称:BrickPython,代码行数:18,代码来源:BrickPiWrapper.py

示例4: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
    def __init__(self, harness, params):
        Scheduler.__init__(self, harness, params)

        # json storage
        self.__session_data = {}

        # Open existing session file
        if os.path.exists(self.options.session_file):
            self.__status_check = True
            try:
                self.__session_file = open(self.options.session_file, 'r+')
                self.__session_data = json.load(self.__session_file)

                # Set some important things that affect findAndRunTests (input file, --re)
                json_args = self.getData('QUEUEMANAGER',
                                         options_regexp=True,
                                         options_input=True,
                                         options_timing=True)
                self.options.input_file_name = json_args['options_input']

                # Honor any new reg_exp supplied by the user
                if self.options.reg_exp:
                    pass
                else:
                    self.options.reg_exp = json_args['options_regexp']

                # Only allow timing if user is asking, and user supplied those options
                # during initial launch phase (otherwise perflog will not be available).
                if not json_args['options_timing'] and self.options.timing:
                    self.options.timing = False


            except ValueError:
                print('Supplied session file: %s exists, but is not readable!' % (self.options.session_file))
                sys.exit(1)

        # session file does not exists. Create one instead.
        elif not self.options.queue_cleanup:
            self.__status_check = False
            self.__session_file = self.__createSessionFile()
            self.putData('QUEUEMANAGER',
                         options_regexp=self.options.reg_exp,
                         options_input=self.options.input_file_name,
                         options_timing=self.options.timing)

        self.params = params
开发者ID:zachmprince,项目名称:moose,代码行数:48,代码来源:QueueManager.py

示例5: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self):
     Scheduler.__init__(self,"SGE")
     self.datasetPath   = None
     self.selectNoInput = None
     self.OSBsize = None
     return
开发者ID:PerilousApricot,项目名称:CRAB2-1,代码行数:8,代码来源:SchedulerSge.py

示例6: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
    def __init__(self):
        SchedulerLsf.__init__(self)
        Scheduler.__init__(self,"CAF")
        self.OSBsize = 55*1000*1000  # 55 MB

        return
开发者ID:edelmann,项目名称:CRAB2,代码行数:8,代码来源:SchedulerCaf.py

示例7: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self):
     Scheduler.__init__(self,"PBSV2WITHSRM")
开发者ID:PerilousApricot,项目名称:CRAB2,代码行数:4,代码来源:SchedulerPbsv2withsrm.py

示例8: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self, harness, params):
     Scheduler.__init__(self, harness, params)
     self.harness = harness
     self.options = self.harness.getOptions()
     self.__job_storage_file = self.harness.original_storage
     self.__clean_args = None
开发者ID:FHilty,项目名称:moose,代码行数:8,代码来源:QueueManager.py

示例9: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self):
     Scheduler.__init__(self, "SLURM")
开发者ID:belforte,项目名称:CRAB2,代码行数:4,代码来源:SchedulerSlurm.py

示例10: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self):
     Scheduler.__init__(self,"PBS")
     self.OSBsize = None
开发者ID:PerilousApricot,项目名称:CRAB2-1,代码行数:5,代码来源:SchedulerPbs.py

示例11: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
 def __init__(self, queue, policy):
     Scheduler.__init__(self, queue)
     self.policy = policy
开发者ID:hachedeeme,项目名称:hacheSO,代码行数:5,代码来源:ShortTermScheduler.py

示例12: __init__

# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
    def __init__(self):
        Scheduler.__init__(self,"LSF")
        self.OSBsize = None

        return
开发者ID:belforte,项目名称:CRAB2,代码行数:7,代码来源:SchedulerLsf.py


注:本文中的Scheduler.Scheduler.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。