本文整理匯總了Python中suds.client.Client.submitBatchJob方法的典型用法代碼示例。如果您正苦於以下問題:Python Client.submitBatchJob方法的具體用法?Python Client.submitBatchJob怎麽用?Python Client.submitBatchJob使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類suds.client.Client
的用法示例。
在下文中一共展示了Client.submitBatchJob方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: check_batch
# 需要導入模塊: from suds.client import Client [as 別名]
# 或者: from suds.client.Client import submitBatchJob [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)