MCPcopy Create free account
hub / github.com/Image-Py/imagepy / runasyn

Method runasyn

imagepy/core/engine/report.py:22–38  ·  view source on GitHub ↗
(self,  wb, info, key, para = None, callback = None)

Source from the content-addressed store, hash-verified

20 def __call__(self): return self
21
22 def runasyn(self, wb, info, key, para = None, callback = None):
23 TaskManager.add(self)
24 for i in para:
25 if i in key and key[i][0] == 'img':
26 ips = ImageManager.get(para[i])
27 para[i] = ips if ips is None else ips.img
28
29 if i in key and key[i][0] == 'tab':
30 tps = TableManager.get(para[i])
31 para[i] = tps if tps is None else tps.data
32
33 start = time()
34 xlreport.fill_value(wb, info, para)
35 wb.save(para['path'])
36 IPy.set_info('%s: cost %.3fs'%(self.title, time()-start))
37 TaskManager.remove(self)
38 if callback!=None:callback()
39
40 def start(self, para=None, callafter=None):
41 wb = pyxl.load_workbook(self.cont)

Callers 1

startMethod · 0.95

Calls 5

saveMethod · 0.80
addMethod · 0.45
getMethod · 0.45
set_infoMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected