MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / run

Method run

task.py:2878–2890  ·  view source on GitHub ↗

运行任务

(self)

Source from the content-addressed store, hash-verified

2876 self._ident = ident
2877
2878 def run(self):
2879 """
2880 运行任务
2881 """
2882 if not self.prep_func():
2883 write_log("任务: {} 无需启动,已跳过".format(self.name))
2884 return
2885 write_log("执行任务: {}".format(self.name))
2886 try:
2887 # write_log("cmd:", self.cmd, _level='debug')
2888 os.system(self.cmd)
2889 except Exception as e:
2890 write_log("执行{}任务失败: {}".format(self.name, str(e)), traceback.format_exc(), _level='error', color='red')
2891
2892
2893class _ScriptService:

Callers 2

startMethod · 0.45
runserver.pyFile · 0.45

Calls 2

write_logFunction · 0.70
formatMethod · 0.45

Tested by

no test coverage detected