Commit 4ef29162 authored by yanzg's avatar yanzg

不记录系统日志

parent f4f83fc0
......@@ -9,6 +9,7 @@ import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.StringHelper;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
......@@ -48,6 +49,9 @@ public class YzgMqProcedure implements InitializingBean {
@Autowired
private MqService mqService;
@Value("${yzg.mq.unit.min:1000}")
private long min;
/**
* Invoked by a BeanFactory after it has set all bean properties supplied
* (and satisfied BeanFactoryAware and ApplicationContextAware).
......@@ -63,8 +67,8 @@ public class YzgMqProcedure implements InitializingBean {
mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE));
mqService.createQueue(new QueueVo(YZG_MQ_SYSTEM_QUEUE_PLAN));
if (YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.isEmpty()) {
// YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MILL_SECOND_125);
// YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MILL_SECOND_250);
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MILL_SECOND_125);
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MILL_SECOND_250);
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MILL_SECOND_500);
YZG_MQ_SYSTEM_QUEUE_PLAN_TIME.add(YZG_MQ_SYSTEM_QUEUE_PLAN_MIN);
long now = YZG_MQ_SYSTEM_QUEUE_PLAN_MIN.unit;
......@@ -77,6 +81,10 @@ public class YzgMqProcedure implements InitializingBean {
}
}
for (TimeUnit item : YZG_MQ_SYSTEM_QUEUE_PLAN_TIME) {
// 在时间范围内,则返回大于等待时间的队列
if (item.unit < min) {
continue;
}
mqService.createQueue(new QueueVo(getQueueName(item), item.unit, YZG_MQ_SYSTEM_QUEUE_PLAN));
}
}
......@@ -101,7 +109,7 @@ 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) {
if (timeUnit.unit >= waitTime && timeUnit.unit >= min) {
break;
}
// 上次单位
......
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