Commit 540f2ee3 by hanzepeng

试一试k8s

parent 3ff5012f
Pipeline #4949 canceled with stage
...@@ -11,7 +11,6 @@ import com.reyun.saas.report.realtimecommon.dao.ChannelInfoMapper; ...@@ -11,7 +11,6 @@ import com.reyun.saas.report.realtimecommon.dao.ChannelInfoMapper;
import com.reyun.saas.report.realtimecommon.domain.ChannelInfo; import com.reyun.saas.report.realtimecommon.domain.ChannelInfo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
...@@ -54,7 +53,7 @@ public class SyncChannelTask { ...@@ -54,7 +53,7 @@ public class SyncChannelTask {
* 从实时数据库中渠道数据 同步数据到web的数据库中 * 从实时数据库中渠道数据 同步数据到web的数据库中
*/ */
@Async @Async
@Scheduled(cron = "0 0/30 * * * ?") // @Scheduled(cron = "0 0/30 * * * ?")
// @Scheduled(cron = "0 * * * * ?") // @Scheduled(cron = "0 * * * * ?")
public void syncChannel() { public void syncChannel() {
//分布式锁 //分布式锁
......
...@@ -9,7 +9,6 @@ import lombok.extern.slf4j.Slf4j; ...@@ -9,7 +9,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource; import javax.annotation.Resource;
...@@ -31,7 +30,7 @@ public class UniversalPwdTask { ...@@ -31,7 +30,7 @@ public class UniversalPwdTask {
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Async @Async
@Scheduled(cron = "0 0 8 * * ? ") // @Scheduled(cron = "0 0 8 * * ? ")
public void genUniversalPwd(){ public void genUniversalPwd(){
if(!"pro".equals(env)){//线上生效 if(!"pro".equals(env)){//线上生效
return; return;
......
...@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
...@@ -36,7 +35,7 @@ public class WarningConfigTask { ...@@ -36,7 +35,7 @@ public class WarningConfigTask {
private WarningConfigMapper warningConfigMapper; private WarningConfigMapper warningConfigMapper;
@Async @Async
@Scheduled(cron = "0 0 * * * ? ")//整点 // @Scheduled(cron = "0 0 * * * ? ")//整点
public void checkWarningReport(){ public void checkWarningReport(){
Boolean lock = stringRedisTemplate.opsForValue().setIfAbsent("checkWarningReport", "lock", 10, TimeUnit.SECONDS); Boolean lock = stringRedisTemplate.opsForValue().setIfAbsent("checkWarningReport", "lock", 10, TimeUnit.SECONDS);
if (!lock) { if (!lock) {
......
...@@ -7,7 +7,6 @@ import com.reyun.saas.mob.user.domain.WorkOrderExport; ...@@ -7,7 +7,6 @@ import com.reyun.saas.mob.user.domain.WorkOrderExport;
import com.reyun.saas.mob.user.thread.workorder.WorkOrderThread; import com.reyun.saas.mob.user.thread.workorder.WorkOrderThread;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example; import tk.mybatis.mapper.entity.Example;
...@@ -42,7 +41,7 @@ public class WorkOrderTask { ...@@ -42,7 +41,7 @@ public class WorkOrderTask {
@Async @Async
// @Scheduled(cron = "0 0/5 * * * ?") // @Scheduled(cron = "0 0/5 * * * ?")
@Scheduled(cron = "0 * * * * ?") // @Scheduled(cron = "0 * * * * ?")
public void scanWorkOrderExport() { public void scanWorkOrderExport() {
//分布式锁 //分布式锁
if (!redisUtils.tryLock("scanWorkOrderExport",10)) { if (!redisUtils.tryLock("scanWorkOrderExport",10)) {
...@@ -90,7 +89,7 @@ public class WorkOrderTask { ...@@ -90,7 +89,7 @@ public class WorkOrderTask {
* 将工期的工单删除 * 将工期的工单删除
*/ */
@Async @Async
@Scheduled(cron = "0 0 * * * ?") // @Scheduled(cron = "0 0 * * * ?")
public void expireWorkOrderDispose() { public void expireWorkOrderDispose() {
//分布式锁 //分布式锁
......
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