| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.zy.acs.common.utils.News; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.PreDestroy; |
| | |
| | | if (tasks.size() == 1) { |
| | | resetCodeIdxList = this.getResetCodeList(lev, tasks.get(0)); |
| | | } else if (tasks.size() > 1) { |
| | | // log.info("consumer task count:{}", tasks.size()); |
| | | resetCodeIdxList = this.getResetCodeList(lev,tasks); |
| | | // News.info("consumer task count:{}", tasks.size()); |
| | | resetCodeIdxList = this.getResetCodeList(lev, tasks); |
| | | } |
| | | |
| | | if (!Cools.isEmpty(resetCodeIdxList)) { |
| | | this.dealResetCodeList(lev, resetCodeIdxList); |
| | | } |
| | | |
| | | // log.info("consumer unlock path spend time:{}", System.currentTimeMillis() - startTime); |
| | | // News.info("consumer unlock path spend time:{}", System.currentTimeMillis() - startTime); |
| | | } |
| | | |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | log.error("PathQueueConsumer[Thread.currentThread.interrupt]", e); |
| | | News.error("PathQueueConsumer[Thread.currentThread.interrupt]", e); |
| | | break; |
| | | } catch (Exception e) { |
| | | log.error("PathQueueConsumer", e); |
| | | News.error("PathQueueConsumer", e); |
| | | } |
| | | } |
| | | }); |
| | |
| | | if (!this.consumerExecutor.awaitTermination(5, TimeUnit.SECONDS)) { |
| | | this.consumerExecutor.shutdownNow(); |
| | | if (!this.consumerExecutor.awaitTermination(5, TimeUnit.SECONDS)) { |
| | | log.error("this.consumerExecutor failed to shutdown"); |
| | | News.error("this.consumerExecutor failed to shutdown"); |
| | | } |
| | | } |
| | | } catch (InterruptedException ie) { |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |