本文整理汇总了Python中toil.job.Job.addService方法的典型用法代码示例。如果您正苦于以下问题:Python Job.addService方法的具体用法?Python Job.addService怎么用?Python Job.addService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toil.job.Job
的用法示例。
在下文中一共展示了Job.addService方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeWorkflow
# 需要导入模块: from toil.job import Job [as 别名]
# 或者: from toil.job.Job import addService [as 别名]
def makeWorkflow():
job = Job()
r1 = job.addService(TestServiceSerialization("woot1"))
r2 = job.addService(TestServiceSerialization("woot2"))
r3 = job.addService(TestServiceSerialization("woot3"))
job.addChildFn(fnTest, [ r1, r2, r3 ], outFile)
return job
示例2: testServiceSerialization
# 需要导入模块: from toil.job import Job [as 别名]
# 或者: from toil.job.Job import addService [as 别名]
def testServiceSerialization(self):
"""
Tests that a service can receive a promise without producing a serialization
error.
"""
job = Job()
service = TestServiceSerialization("woot")
startValue = job.addService(service) # Add a first service to job
subService = TestServiceSerialization(startValue) # Now create a child of
# that service that takes the start value promise from the parent service
job.addService(subService, parentService=service) # This should work if
# serialization on services is working correctly.
self.runToil(job)