本文整理汇总了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
示例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
示例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() )
示例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
示例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
示例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
示例7: __init__
# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
def __init__(self):
Scheduler.__init__(self,"PBSV2WITHSRM")
示例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
示例9: __init__
# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
def __init__(self):
Scheduler.__init__(self, "SLURM")
示例10: __init__
# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
def __init__(self):
Scheduler.__init__(self,"PBS")
self.OSBsize = None
示例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
示例12: __init__
# 需要导入模块: from Scheduler import Scheduler [as 别名]
# 或者: from Scheduler.Scheduler import __init__ [as 别名]
def __init__(self):
Scheduler.__init__(self,"LSF")
self.OSBsize = None
return