MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / runner

Method runner

client/task/model/datahandle.py:57–75  ·  view source on GitHub ↗

执行结果处理,调用结果处理的适配类 :return: task是否成功

(self, params)

Source from the content-addressed store, hash-verified

55 pass
56
57 def runner(self, params):
58 """
59 执行结果处理,调用结果处理的适配类
60 :return: task是否成功
61 """
62 Reporter(params).update_task_progress(InfoType.DataHandleTask)
63 # 调整扫描结果数据结构
64 # 循环执行结果处理队列
65 for datahander_type in HANDLE_QUEUE:
66 if QuickScan.is_quick_scan() and datahander_type not in [Formater, IssueIgnore]:
67 continue
68 tool_handle_type_name = datahander_type.get_tool_handle_type_name()
69 logger.info(f"[Start] {tool_handle_type_name}")
70 start_time = time.time()
71 datahander_type(getattr(self.tool, tool_handle_type_name)()).run(params)
72 logger.info(f"[End] {tool_handle_type_name} (use time: {time.time() - start_time})")
73
74 logger.info("datahandle done!")
75 return params["result"]
76
77
78task = DataHandleTask

Callers

nothing calls this directly

Calls 6

ReporterClass · 0.90
is_quick_scanMethod · 0.80
update_task_progressMethod · 0.45
infoMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected