Commit 4d866568 authored by 赵啸非's avatar 赵啸非

修改导入事项与材料

parent aa22de20
...@@ -85,14 +85,19 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -85,14 +85,19 @@ public class DemoStartedService implements IApplicationStartedService {
//启动短信发送响应更新线程 //启动短信发送响应更新线程
new Thread(() -> {
int waitTime = 5000; ThreadPool.getInstance().execute(() -> {
int waitTime = 1000;
while (!stopped) { while (!stopped) {
try { try {
MessageTaskEntity message = SmsQueueManager.pollRespQueue(); MessageTaskEntity message = SmsQueueManager.pollRespQueue();
if (!ObjectUtils.isEmpty(message)) { if (!ObjectUtils.isEmpty(message)) {
messageTaskService.update(message, null); messageTaskService.update(message, null);
} }
try {
Thread.sleep(waitTime);
} catch (InterruptedException e2) {
}
} catch (Exception e) { } catch (Exception e) {
if (!stopped) { if (!stopped) {
try { try {
...@@ -102,7 +107,8 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -102,7 +107,8 @@ public class DemoStartedService implements IApplicationStartedService {
} }
} }
} }
}).start(); });
AlarmSendMsgThread alarmSendMsgThread = new AlarmSendMsgThread(smsSendUrl, apiId); AlarmSendMsgThread alarmSendMsgThread = new AlarmSendMsgThread(smsSendUrl, apiId);
ThreadPool.getInstance().execute(alarmSendMsgThread); ThreadPool.getInstance().execute(alarmSendMsgThread);
......
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