本文整理汇总了Python中EDPlugin.EDPlugin.preProcess方法的典型用法代码示例。如果您正苦于以下问题:Python EDPlugin.preProcess方法的具体用法?Python EDPlugin.preProcess怎么用?Python EDPlugin.preProcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EDPlugin.EDPlugin
的用法示例。
在下文中一共展示了EDPlugin.preProcess方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
EDPlugin.preProcess(self, _edObject)
EDVerbose.DEBUG("EDPluginWrapperForJobScheduler.preProcess")
# Construct python script for executing the plugin
strPythonWrapper = self.preparePythonWrapperScript()
self.__strPathToPythonWrapper = os.path.join(self.getWorkingDirectory(), self.__strPythonWrapperScriptName)
EDUtilsFile.writeFile(self.__strPathToPythonWrapper, strPythonWrapper)
示例2: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
EDPlugin.preProcess(self)
self.DEBUG("EDPluginAccumulatorv1_0.preProcess")
self.__semaphore.acquire()
for oneXsdItem in self.getDataInput().getItem(): #could be empty
self.__items.append(oneXsdItem.getValue())
for oneXsdQuery in self.getDataInput().getQuery(): #could be an empty list
query = []
for oneXsdItem in oneXsdQuery.getItem():
query.append(oneXsdItem.getValue())
if oneXsdQuery.getRemoveItems() is not None:
if oneXsdQuery.getRemoveItems().getValue() in [1, True, "true"]:
removeItems = True
elif oneXsdQuery.getRemoveItems().getValue() in [0, False, "false", None]:
removeItems = False
else:
removeItems = True
else:
removeItems = True
query.sort()
self.__queries[tuple(query)] = removeItems
self.__semaphore.release()
if self.getDataInput().getFlush() is not None:
if self.getDataInput().getFlush().getValue() in [1, True, "true"]:
self.flush = True
示例3: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
EDPlugin.preProcess(self)
self.DEBUG("EDPluginAccumulatorv1_0.preProcess")
with self.__class__._semaphore:
for oneXsdItem in self.dataInput.item: #could be empty
self._items.append(oneXsdItem.value)
for oneXsdQuery in self.dataInput.query: #could be an empty list
query = []
for oneXsdItem in oneXsdQuery.item:
query.append(oneXsdItem.value)
if oneXsdQuery.removeItems is not None:
if oneXsdQuery.removeItems.value in [1, True, "true"]:
removeItems = True
elif oneXsdQuery.removeItems.value in [0, False, "false", None]:
removeItems = False
else:
removeItems = True
else:
removeItems = True
query.sort()
self._queries[tuple(query)] = removeItems
if self.dataInput.flush is not None:
if self.dataInput.flush.value in [1, True, "true"]:
self.flush = True
示例4: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
EDPlugin.preProcess(self)
self.DEBUG("EDPluginWaitFile.preProcess")
self.__filename = self.getDataInput().getExpectedFile().getPath().getValue()
self.__expectedSize = self.getDataInput().getExpectedSize().getValue()
if self.getDataInput().getTimeOut():
self.__timeout = self.getDataInput().getTimeOut().getValue()
self.setTimeOut(self.getDataInput().getTimeOut().getValue() + EDPluginWaitFile.EXTRA_TIME)
示例5: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
"""
preProcess of the plugin:
Ensure a CPU resource is available for the processing by acquiring a semaphore
"""
EDVerbose.DEBUG("Acquire semaphore nbCPU by plugin %s, currently value: %s" % (self.getPluginName(), EDUtilsParallel.getSemaphoreValue()))
EDUtilsParallel.semaphoreNbThreadsAcquire()
EDPlugin.preProcess(self, _edObject)
示例6: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
"""
preProcess of the plugin:
Ensure a CPU resource is available for the processing by acquiring a semaphore
"""
self.DEBUG("Acquire semaphore nbCPU by plugin %s" % self.getPluginName())
EDUtilsParallel.semaphoreNbThreadsAcquire()
EDPlugin.preProcess(self, _edObject)
示例7: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject = None):
EDPlugin.preProcess(self)
self.DEBUG("EDPluginParseXdsOutput.preProcess")
示例8: preProcess
# 需要导入模块: from EDPlugin import EDPlugin [as 别名]
# 或者: from EDPlugin.EDPlugin import preProcess [as 别名]
def preProcess(self, _edObject=None):
EDPlugin.preProcess(self)
self.DEBUG("EDPluginParseXscaleOutputv1_0.preProcess")