提交 baa87141 authored 作者: 133's avatar 133

feat(装备模块): 添加了定时任务 定时去刷新设备的缓存

添加了定时任务 定时去刷新设备的缓存
上级 422f0129
package com.tykj.dev.device.library.task;
import com.tykj.dev.device.library.service.DeviceLibraryCacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
/**
* @author zjm
* @version 1.0.0
* @ClassName TrainTask.java
* @Description 培训定时任务 主要是 判断报名截止以及培训开始、培训结束
* @createTime 2020年08月17日 23:20:00
*/
@Service
@Slf4j
public class DevideTask {
@Autowired
DeviceLibraryCacheService deviceLibraryCacheService;
@Scheduled(cron = "30 * * * * ? ")
private void signUpDeadline() {
log.info("定时device更新缓存开始");
deviceLibraryCacheService.getAllDeviceLibraryList();
log.info("定时device更新缓存结束");
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论