本文整理汇总了Python中suds.client.Client.getBatchJob方法的典型用法代码示例。如果您正苦于以下问题:Python Client.getBatchJob方法的具体用法?Python Client.getBatchJob怎么用?Python Client.getBatchJob使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类suds.client.Client
的用法示例。
在下文中一共展示了Client.getBatchJob方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_batch
# 需要导入模块: from suds.client import Client [as 别名]
# 或者: from suds.client.Client import getBatchJob [as 别名]
def check_batch(mutalyzer_url):
"""
Check if the batch name checker can be called.
"""
wsdl_url = mutalyzer_url + '/services/?wsdl'
service = Client(wsdl_url, cache=None).service
variants = ['AB026906.1(SDHD):g.7872G>T',
'NM_003002.1:c.3_4insG',
'AL449423.14(CDKN2A_v002):c.5_400del']
data = '\n'.join(variants).encode('base64')
result = service.submitBatchJob(data, 'NameChecker')
job_id = result
for _ in range(BATCH_MAX_POLL):
try:
result = service.getBatchJob(job_id)
break
except WebFault:
time.sleep(BATCH_POLL_WAIT)
else:
sys.exit(1)
response = result.decode('base64')
assert len([_ for line in response.split('\n') if line.strip()]) - 1 == len(variants)