本文整理汇总了Python中toil.common.Toil.createBatchSystem方法的典型用法代码示例。如果您正苦于以下问题:Python Toil.createBatchSystem方法的具体用法?Python Toil.createBatchSystem怎么用?Python Toil.createBatchSystem使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toil.common.Toil
的用法示例。
在下文中一共展示了Toil.createBatchSystem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from toil.common import Toil [as 别名]
# 或者: from toil.common.Toil import createBatchSystem [as 别名]
def main():
parser = getBasicOptionParser()
parser.add_argument(
"jobStore",
type=str,
help=(
"Store in which to place job management files \
and the global accessed temporary files"
"(If this is a file path this needs to be globally accessible "
"by all machines running jobs).\n"
"If the store already exists and restart is false an"
" ExistingJobStoreException exception will be thrown."
),
)
parser.add_argument("--version", action="version", version=version)
options = parseBasicOptions(parser)
jobStore = Toil.loadOrCreateJobStore(options.jobStore)
logger.info("Starting routine to kill running jobs in the toil workflow: %s" % options.jobStore)
####This behaviour is now broken
batchSystem = Toil.createBatchSystem(
jobStore.config
) # This should automatically kill the existing jobs.. so we're good.
for jobID in batchSystem.getIssuedBatchJobIDs(): # Just in case we do it again.
batchSystem.killBatchJobs(jobID)
logger.info("All jobs SHOULD have been killed")
示例2: main
# 需要导入模块: from toil.common import Toil [as 别名]
# 或者: from toil.common.Toil import createBatchSystem [as 别名]
def main():
parser = getBasicOptionParser()
parser.add_argument("jobStore", type=str,
help="The location of the job store used by the workflow whose jobs should "
"be killed." + jobStoreLocatorHelp)
parser.add_argument("--version", action='version', version=version)
options = parseBasicOptions(parser)
jobStore = Toil.resumeJobStore(options.jobStore)
logger.info("Starting routine to kill running jobs in the toil workflow: %s" % options.jobStore)
####This behaviour is now broken
batchSystem = Toil.createBatchSystem(jobStore.config) #This should automatically kill the existing jobs.. so we're good.
for jobID in batchSystem.getIssuedBatchJobIDs(): #Just in case we do it again.
batchSystem.killBatchJobs(jobID)
logger.info("All jobs SHOULD have been killed")