子线程测试
This commit is contained in:
parent
65a5f94ea2
commit
5b9376d3b7
@ -103,8 +103,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
@Autowired
|
@Autowired
|
||||||
private DingtalkBusiness dingtalkBusiness;
|
private DingtalkBusiness dingtalkBusiness;
|
||||||
|
|
||||||
ThreadInitFlowRecord threadInitFlowRecord;// = new ThreadInitFlowRecord(resultRecords, noticeStaff);
|
List<ThreadInitFlowRecord> threads = new ArrayList<>();
|
||||||
Thread thread;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -811,9 +810,10 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
|
|
||||||
private void initFlowRecordAnsy(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
|
private void initFlowRecordAnsy(List<ResultRecord> resultRecords, List<StaffSimpleInfo> noticeStaff){
|
||||||
if(resultRecords.size() > 0){
|
if(resultRecords.size() > 0){
|
||||||
threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff);
|
ThreadInitFlowRecord threadInitFlowRecord = new ThreadInitFlowRecord(resultRecords, noticeStaff);
|
||||||
thread = new Thread(threadInitFlowRecord);
|
Thread thread = new Thread(threadInitFlowRecord);
|
||||||
thread.start();
|
thread.start();
|
||||||
|
threads.add(threadInitFlowRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -841,7 +841,7 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
|||||||
}
|
}
|
||||||
//ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo);
|
//ch.qos.logback.classic.Logger.threadLocalNo.set(oldNo);
|
||||||
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
dingtalkBusiness.sendWorkMSGWithAsyn(noticeStaff, WorkMsgTypeEnum.START_WORK.getType());
|
||||||
//threads.remove(this);
|
threads.remove(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user