优化
This commit is contained in:
parent
6ae7f020d2
commit
dc450d6ce1
26
src/main/java/com/xkrs/common/StaticScheduleTask.java
Normal file
26
src/main/java/com/xkrs/common/StaticScheduleTask.java
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
package com.xkrs.common;
|
||||||
|
|
||||||
|
import com.xkrs.straw.utils.FirePointSubscribeManager;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新订阅计划任务
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableScheduling
|
||||||
|
public class StaticScheduleTask {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private FirePointSubscribeManager firePointSubscribeManager;
|
||||||
|
|
||||||
|
//每两小时更新一次订阅
|
||||||
|
@Scheduled(cron = "0 0 */2 * * ?")
|
||||||
|
private void syncSubscribe() {
|
||||||
|
firePointSubscribeManager.autoSync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user