public void listen() {
while (true) {
String answercard = answerCardDDao.bpopAnswer();
// computeScore(answercard);
threadPooltaskExecutor.execute(new InnerThread(answercard));
}
}
class InnerThread implements Runnable {
String answercardss;
public InnerThread(String answercardss) {
this.answercardss = answercardss;
}
@Override
public void run() {
computeScore(answercardss);
}
}
private void computeScore(String answercardss) {
......}
@Async
public void startProcess(LocalDate date) {
List<Long> ids = orderService.getTodayOrder(date);
for (Long id : ids)
orderService.auto(id);
}