Commit f8bd3c32 authored by yanzg's avatar yanzg

不记录系统日志

parent 322895fe
......@@ -5,6 +5,7 @@ import com.yanzuoguang.mq.vo.MessagePlan;
import com.yanzuoguang.mq.vo.MessageVo;
import com.yanzuoguang.mq.vo.QueueVo;
import com.yanzuoguang.mq.vo.req.RegisterServerTokenReqVo;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.StringHelper;
import org.springframework.beans.factory.InitializingBean;
......@@ -109,12 +110,15 @@ public class YzgMqProcedure implements InitializingBean {
TimeUnit prevUnit = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN;
for (TimeUnit timeUnit : YZG_MQ_SYSTEM_QUEUE_PLAN_TIME) {
// 在时间范围内,则返回大于等待时间的队列
if (timeUnit.unit >= waitTime && timeUnit.unit >= min) {
if (timeUnit.unit >= waitTime && timeUnit.unit > min) {
break;
}
// 上次单位
prevUnit = timeUnit;
}
if (prevUnit.unit < min) {
throw new CodeException("算法错误");
}
// 返回最大时间的队列
return prevUnit;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment