use of com.orion.ops.handler.app.machine.IMachineProcessor in project orion-ops by lijiahangmax.
the class ApplicationBuildServiceImpl method terminatedBuildTask.
@Override
public void terminatedBuildTask(Long id) {
// 获取数据
ApplicationBuildDO build = applicationBuildDAO.selectById(id);
Valid.notNull(build, MessageConst.UNKNOWN_DATA);
// 检查状态
Valid.isTrue(BuildStatus.RUNNABLE.getStatus().equals(build.getBuildStatus()), MessageConst.ILLEGAL_STATUS);
// 获取实例
IMachineProcessor session = buildSessionHolder.getSession(id);
Valid.notNull(session, MessageConst.SESSION_PRESENT);
// 调用终止
session.terminated();
// 设置日志参数
EventParamsHolder.addParam(EventKeys.ID, id);
EventParamsHolder.addParam(EventKeys.BUILD_SEQ, build.getBuildSeq());
EventParamsHolder.addParam(EventKeys.APP_NAME, build.getAppName());
EventParamsHolder.addParam(EventKeys.PROFILE_NAME, build.getProfileName());
}
Aggregations