fix - 调整日志级别

This commit is contained in:
wangli 2024-08-06 17:33:56 +08:00
parent 3d9870b6a5
commit c8d849ab18
2 changed files with 5 additions and 2 deletions

View File

@ -19,6 +19,7 @@ public enum OtherRespCode implements IModuleRespCode {
CLIENT_VERSION_SUPPORT("004", "客户端 JAR 包版本不支持,请升级到 {} 版本, 当前版本 {}"),
MICRO_SERVER_NEED_REBUILD("005", "微服务 {} 需要重新编译发布, 如果是本地调用,请访问 WebApi 接口在现有的接口地址前加上“web/v1/”即可"),
MESSAGE_PUSH_EVENT_BUILD_ERROR("006", "不能使用 createEvent 函数创建`发送待办`的事件, 请调用 createPendingPushEvent 函数"),
ASYNC_JOB_EXECUTION_ERROR("007", "获取指定实例 ID【{}】的锁失败")
;
private final String code;

View File

@ -1,6 +1,6 @@
package cn.axzo.workflow.core.engine.job;
import cn.axzo.framework.domain.ServiceException;
import cn.axzo.workflow.core.common.exception.WorkflowEngineException;
import cn.axzo.workflow.core.common.utils.SpringContextUtils;
import cn.axzo.workflow.core.repository.entity.ExtAxProperty;
import cn.axzo.workflow.core.service.ExtAxPropertyService;
@ -16,6 +16,8 @@ import org.springframework.dao.DuplicateKeyException;
import java.util.concurrent.TimeUnit;
import static cn.axzo.workflow.core.common.code.OtherRespCode.ASYNC_JOB_EXECUTION_ERROR;
public abstract class AbstractExecuteWithLockJobHandler extends AbstractJobHandler implements JobHandler {
private static final Logger log = LoggerFactory.getLogger(AbstractExecuteWithLockJobHandler.class);
@ -34,7 +36,7 @@ public abstract class AbstractExecuteWithLockJobHandler extends AbstractJobHandl
executeInternal(job, configuration, variableScope, commandContext);
} else {
log.warn("get lock failed,processInstanceId:{},jobId:{}", processInstanceId, jobId);
throw new ServiceException("acquire lock failed");
throw new WorkflowEngineException(ASYNC_JOB_EXECUTION_ERROR);
}
} finally {
releaseLock(processInstanceId, jobId);