线程优化

This commit is contained in:
thinkgem
2020-05-12 15:15:19 +08:00
parent bff4fd8d79
commit 231de0bfc7
3 changed files with 10 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
});
// 手动触发消息推送任务
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
new Thread(){
Thread thread = new Thread("msg-push-task-execute"){
public void run() {
try{
MsgPushUtils.getMsgPushTask().execute();
@@ -198,7 +198,9 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
logger.error("实时消息发送失败,推送服务配置不正确。", ex);
}
}
}.start();
};
thread.setDaemon(true);
thread.start();
}
}

View File

@@ -14,4 +14,5 @@
4.1.5
4.1.6
4.1.7
4.1.8
4.1.8
4.1.9