修改命令行输出

This commit is contained in:
龙澳 2024-12-25 15:35:08 +08:00
parent 1393839ac8
commit cdea54e77a

View File

@ -64,7 +64,8 @@ class ODMProcessMonitor:
# 只在失败时获取日志
if result['StatusCode'] != 0:
logs = container.logs().decode('utf-8')
self.logger.error(f"容器执行失败最后100行日志\n{''.join(logs.split('\n')[-100:])}")
self.logger.error("容器执行失败最后10行日志")
self.logger.error(''.join(logs.split('\n')[-10:]))
# 检查是否成功完成
if result['StatusCode'] == 0 and self._check_success(grid_dir):