[dev] optimize log & alomost release 3.2.3

This commit is contained in:
tjq 2020-08-09 13:40:09 +08:00
parent 5b4591c8b1
commit 44ae8608ff
3 changed files with 6 additions and 4 deletions

View File

@ -90,6 +90,7 @@ public class DingTalkUtils implements Closeable {
if (execute.isSuccess()) {
return execute.getUserid();
}
log.info("[DingTalkUtils] fetch userId by mobile({}) failed,reason is {}.", mobile, execute.getErrmsg());
throw new OmsException("fetch userId by phone number failed, reason is " + execute.getErrmsg());
}

View File

@ -20,11 +20,12 @@ public class AlarmCenter {
private static final ExecutorService POOL;
private static final List<Alarmable> BEANS = Lists.newLinkedList();
private static final int THREAD_KEEP_ALIVE_TIME_M = 5;
static {
int cores = Runtime.getRuntime().availableProcessors();
ThreadFactory factory = new ThreadFactoryBuilder().setNameFormat("AlarmPool-%d").build();
POOL = new ThreadPoolExecutor(cores, cores, 5, TimeUnit.MINUTES, Queues.newLinkedBlockingQueue(), factory);
POOL = new ThreadPoolExecutor(cores, cores, THREAD_KEEP_ALIVE_TIME_M, TimeUnit.MINUTES, Queues.newLinkedBlockingQueue(), factory);
}

View File

@ -22,9 +22,9 @@ spring.mail.properties.mail.smtp.starttls.enable=true
spring.mail.properties.mail.smtp.starttls.required=true
####### 钉钉报警配置(不需要钉钉报警可以删除以下配置来避免报错) #######
oms.alarm.ding.app-key=dingauqwkvxxnqskknfv
oms.alarm.ding.app-secret=XWrEPdAZMPgJeFtHuL0LH73LRj-74umF2_0BFcoXMfvnX0pCQvt0rpb1JOJU_HLl
oms.alarm.ding.agent-id=847044348
oms.alarm.ding.app-key=
oms.alarm.ding.app-secret=
oms.alarm.ding.agent-id=
####### 资源清理配置 #######
oms.instanceinfo.retention=7