26 lines
654 B
Java
26 lines
654 B
Java
|
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();
|
||
|
}
|
||
|
|
||
|
}
|