| | |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.ints.entity.WaitMatin; |
| | | import com.zy.ints.service.WaitMatinService; |
| | | import com.zy.ints.task.handler.WaitMatinLogHandler; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | */ |
| | | @Component |
| | | public class WaitMatinLogScheduler { |
| | | |
| | | private static final Logger log = LoggerFactory.getLogger(WaitMatinLogScheduler.class); |
| | | |
| | | @Autowired |
| | | private WaitMatinLogHandler waitMatinLogHandler; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | @Autowired |
| | | private WaitMatinService waitMatinService; |
| | | |
| | | |
| | | @Scheduled(cron = "0/4 * * * * ? ") |
| | | private void execute(){ |
| | | List<WaitMatin> WaitMatins = null; |
| | | List<WaitMatin> WaitMatins = waitMatinService.selectWaitMatinBySts(); |
| | | for (WaitMatin waitMatin : WaitMatins) { |
| | | ReturnT<String> result = waitMatinLogHandler.start(waitMatin); |
| | | if (!result.isSuccess()) { |