2021-08-16 14:09:02 +08:00
|
|
|
package io.dataease.job.sechedule;
|
|
|
|
|
|
|
|
import com.fit2cloud.quartz.anno.QuartzScheduled;
|
2021-11-01 18:45:43 +08:00
|
|
|
import io.dataease.service.datasource.DatasourceService;
|
2021-08-16 14:09:02 +08:00
|
|
|
import io.dataease.service.dataset.DataSetTableService;
|
2021-08-20 17:32:13 +08:00
|
|
|
import org.springframework.stereotype.Component;
|
2021-08-16 14:09:02 +08:00
|
|
|
|
2021-08-19 14:09:51 +08:00
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
2021-08-20 17:32:13 +08:00
|
|
|
@Component
|
2021-08-16 14:09:02 +08:00
|
|
|
public class Schedular {
|
2021-08-19 14:09:51 +08:00
|
|
|
@Resource
|
2021-08-16 14:09:02 +08:00
|
|
|
private DataSetTableService dataSetTableService;
|
2021-08-19 14:09:51 +08:00
|
|
|
@Resource
|
|
|
|
private DatasourceService datasourceService;
|
2021-08-16 14:09:02 +08:00
|
|
|
|
|
|
|
@QuartzScheduled(cron = "0 0/3 * * * ?")
|
|
|
|
public void updateDatasetTableStatus() {
|
|
|
|
dataSetTableService.updateDatasetTableStatus();
|
|
|
|
}
|
|
|
|
|
|
|
|
@QuartzScheduled(cron = "0 0/30 * * * ?")
|
|
|
|
public void updateDatasourceStatus() {
|
2021-08-19 14:09:51 +08:00
|
|
|
datasourceService.updateDatasourceStatus();
|
2021-08-16 14:09:02 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|