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


Python EDJob.getJobId方法代码示例

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


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

示例1: unitTestExecute

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
    def unitTestExecute(self):
        """
        check the execution of a job (without callback)
        """
        EDVerbose.DEBUG("EDTestCaseEDJob.unitTestExecute")
        edJob = EDJob(self.strPluginName)
        strJobId = edJob.getJobId()
        edJob.setDataInput(self.strXmlInput)
        ref = edJob.execute()
        EDAssert.equal(strJobId, ref, "JobId has not changed")
        strStatus = edJob.getStatus()
        EDVerbose.WARNING("Job %s in State %s" % (strJobId, strStatus))

        while strStatus in ["running", "uninitialized"]:
            EDVerbose.WARNING("Job %s in state %s" % (strJobId, strStatus))
            time.sleep(0.01)
            strStatus = edJob.getStatus()

        xsdOut = edJob.getDataOutput()
        while xsdOut is None:
            EDVerbose.WARNING("No Output data, still waiting for output data to arrive, %s" % edJob.getStatus())
            time.sleep(0.01)
            xsdOut = edJob.getDataOutput()
        strOutput = xsdOut.strip()
        strStatus = edJob.getStatus()
        while strStatus == "running":
            EDVerbose.WARNING("Job %s is still in state %s" % (strJobId, strStatus))
            time.sleep(0.01)
            strStatus = edJob.getStatus()

        EDAssert.equal(strOutput, self.strXmlInput, "Output is OK")
        EDAssert.equal("success", edJob.getStatus(), "Job %s is finished with ''success''" % edJob.getJobId())
开发者ID:antolinos,项目名称:edna,代码行数:34,代码来源:EDTestCaseEDJob.py

示例2: unitTestInitialState

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
 def unitTestInitialState(self):
     """
     check the status after a job creation
     """
     EDVerbose.DEBUG("EDTestCaseEDJob.unitTestInitialState")
     edJob = EDJob(self.strPluginName)
     strJobId = edJob.getJobId()
     EDVerbose.DEBUG("EDJobId is: %s" % strJobId)
     EDAssert.equal(2, len(strJobId.split("-")), "JobID is composed of 2 parts")
     EDAssert.equal(True, strJobId.split("-")[1].isdigit(), "JobID's second part is an integer")
     EDAssert.equal("uninitialized", edJob.getStatus(), "Initial stat is ''uninitialized''")
开发者ID:antolinos,项目名称:edna,代码行数:13,代码来源:EDTestCaseEDJob.py

示例3: startJob

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
 def startJob(self, argin):
     """
     @param argin: 2-list [ "EDPluginName", "<xml/><XSDataInputPluginName>...."]
     @return: jobID which is a sting: Plugin-000001
     """
     self.DEBUG("In %s.startJob()" % self.get_name())
     name, xsd = argin[:2]
     if xsd.strip() == "":
         return
     edJob = EDJob(name)
     if edJob is None:
         return "Error in load Plugin"
     jobId = edJob.getJobId()
     edJob.setDataInput(xsd)
     self.jobQueue.put(edJob)
     return jobId
开发者ID:kif,项目名称:edna,代码行数:18,代码来源:tango-EdnaDS.py

示例4: startJob

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
 def startJob(self, argin):
     """
     @param argin: 2-list [ "EDPluginName", "<xml/><XSDataInputPluginName>...."]
     @return: jobID which is a sting: Plugin-000001
     """
     self.DEBUG("In %s.startJob()" % self.get_name())
     name, xsd = argin[:2]
     if xsd.strip() == "":
         return
     edJob = EDJob(name)
     if edJob is None:
         return "Error in load Plugin"
     jobId = edJob.getJobId()
     edJob.setDataInput(xsd)
     self.jobQueue.put(edJob)
     if self.processingSem._Semaphore__value > 0 :
         t = threading.Thread(target=self.startProcessing)
         t.start()
     return jobId
开发者ID:antolinos,项目名称:edna,代码行数:21,代码来源:tango-EdnaDS.py

示例5: startJob

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
 def startJob(self, xsd):
     """
     @param xsd: XML data structure as a string or path to a string
     @return: jobID which is a sting: Plugin-000001
     """
     self.DEBUG("In %s.startJob()" % self.__class__.__name__)
     if xsd.strip() == "":
         return
     if os.path.isfile(xsd):
         xsd = open(xsd, "rb").read()
     edJob = EDJob(self.pluginName)
     if edJob is None:
         return "Error in load Plugin"
     jobId = edJob.getJobId()
     edJob.setDataInput(xsd)
     self.jobQueue.put(edJob)
     if self.processingSem._Semaphore__value > 0 :
         t = threading.Thread(target=self.startProcessing)
         t.start()
     return jobId
开发者ID:gbourgh,项目名称:edna,代码行数:22,代码来源:reprocess_HPLC.py

示例6: unitTestSetGetData

# 需要导入模块: from EDJob import EDJob [as 别名]
# 或者: from EDJob.EDJob import getJobId [as 别名]
 def unitTestSetGetData(self):
     """
     check the status after a job creation
     """
     EDVerbose.DEBUG("EDTestCaseEDJob.unitTestSetGetData")
     edJob = EDJob(self.strPluginName)
     edJob.setDataInput(self.strXmlInput)
     EDAssert.equal(self.strXmlInput, edJob.getDataInput().strip(), "Data Input is correctly set")
     EDAssert.equal("uninitialized", edJob.getStatus(), "Job %s is still ''uninitialized''" % edJob.getJobId())
开发者ID:antolinos,项目名称:edna,代码行数:11,代码来源:EDTestCaseEDJob.py


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