打开定时任务
parent
834f17659b
commit
4cd8a1dcb8
|
|
@ -54,8 +54,9 @@ public class AlarmTask {
|
|||
|
||||
@Autowired
|
||||
private StRiverRRealService stRiverRRealService;
|
||||
//
|
||||
// @Scheduled(fixedRate = 10, timeUnit = TimeUnit.SECONDS)
|
||||
|
||||
@Async
|
||||
@Scheduled(fixedRate = 10, timeUnit = TimeUnit.MINUTES)
|
||||
public void updateAlarmSet(){
|
||||
//查询告警设置中所有的配置的站点
|
||||
List<AlarmSet> alarmSets = alarmSetMapper.selectList(null);
|
||||
|
|
@ -66,8 +67,8 @@ public class AlarmTask {
|
|||
}
|
||||
}
|
||||
|
||||
// @Async
|
||||
// @Scheduled(fixedRate = 30, timeUnit = TimeUnit.SECONDS)
|
||||
@Async
|
||||
@Scheduled(fixedRate = 10, timeUnit = TimeUnit.MINUTES)
|
||||
public void updateWaterAlarm(){
|
||||
List<AttResBaseVo> attResBaseVos = attResBaseMapper.queryList();
|
||||
AttResBaseVo attResBaseVo = attResBaseVos.get(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue