Commit f76cf991 authored by 陈宏杰's avatar 陈宏杰

测试环境不跑定时任务

parent fbc83fa8
......@@ -8,8 +8,8 @@ import com.google.common.base.Stopwatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
......@@ -43,10 +43,16 @@ public class QuantGroupZhuDaiReportToBaiHang {
@Autowired
private DingTalk dingTalk;
@Value("${isDebug}")
private Boolean isDebug;
// @Async
//@Scheduled(cron = "0 0 05 * * ?")
@Scheduled(cron = "0 0 03 * * ?")
public void startZhuDaiReport(){
if (isDebug){ //测试环境不跑定时任务
return;
}
if(increment()){
redisTemplate.expire(Constant.QG_ZHU_DAI_REPORT_LOCK_KEY, 10, TimeUnit.SECONDS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment