🎨 测试环境不定时推送主页更新

This commit is contained in:
x ronger 2020-03-28 13:38:29 +08:00
parent 005c7f0189
commit e29733bb35

View File

@ -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() {
BaiDuUtils.updateSEOData(domain);
if (!ProjectConstant.ENV.equals(env)) {
BaiDuUtils.updateSEOData(domain);
}
}
}