🎨 测试环境不定时推送主页更新
This commit is contained in:
parent
005c7f0189
commit
e29733bb35
@ -1,5 +1,6 @@
|
||||
package com.rymcu.vertical.task;
|
||||
|
||||
import com.rymcu.vertical.core.constant.ProjectConstant;
|
||||
import com.rymcu.vertical.util.BaiDuUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -12,13 +13,17 @@ public class BaiduCronTask {
|
||||
|
||||
@Value("${resource.domain}")
|
||||
private String domain;
|
||||
@Value(("${env}"))
|
||||
private String env;
|
||||
|
||||
/**
|
||||
* 定时推送首页更新
|
||||
* */
|
||||
@Scheduled(cron = "0 0 10,14,18 * * ?")
|
||||
public void pushHome() {
|
||||
if (!ProjectConstant.ENV.equals(env)) {
|
||||
BaiDuUtils.updateSEOData(domain);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user