|
@@ -334,11 +334,11 @@ public class RabbitMqListener {
|
|
|
// 获取缓存锁,防止重复消费
|
|
|
Long building = redisUtil.incr(key, 1);
|
|
|
buildLogService.save(buildLog);
|
|
|
- if (building.equals(1L)) {
|
|
|
- log.error("服务:{},重复构建:{}",SysConstants.hostName,buildLog.getSceneNum());
|
|
|
+ if (building > 1) {
|
|
|
+ log.error("服务:{},重复构建:{}", SysConstants.hostName, buildLog.getSceneNum());
|
|
|
throw new BuildException(ModelingBuildStatus.REPEAT);
|
|
|
- }else{
|
|
|
- redisUtil.expire(key,SysConstants.modelTimeOut);
|
|
|
+ } else {
|
|
|
+ redisUtil.expire(key, SysConstants.modelTimeOut);
|
|
|
}
|
|
|
}
|
|
|
|