Authored by mingdan.ge

测试

... ... @@ -26,7 +26,7 @@ public class CpsOrdersSumMessageTask {
IUnionShareService unionShareService;
@Resource
GlobalRedisValueCache redisValueCache;
GlobalRedisValueCache globalRedisValueCache;
private static String TASK_KEY = "yh:union:share:CpsOrdersSumMessageTask:";
... ... @@ -58,9 +58,10 @@ public class CpsOrdersSumMessageTask {
// }
String key = TASK_KEY + DateUtil.getToday("yyyyMMdd");
boolean lock = redisValueCache.getLock(key,2, TimeUnit.DAYS);
boolean lock = globalRedisValueCache.getLock(key,2, TimeUnit.DAYS);
if (!lock) {
logger.info("The competition failure,other get task.");
return;
}
logger.info("get this task,ip is {}",LocalhostIpFetcher.fetchLocalIP());
... ...
... ... @@ -25,7 +25,7 @@ public class CpsSettlementMessageTask {
@Autowired
IUnionShareService unionShareService;
@Resource
GlobalRedisValueCache redisValueCache;
GlobalRedisValueCache globalRedisValueCache;
private static String SETTLEMENT_TASK_KEY = "yh:union:share:CpsSettlementMessageTask:";
... ... @@ -58,9 +58,10 @@ public class CpsSettlementMessageTask {
// }
String key = SETTLEMENT_TASK_KEY + DateUtil.getToday("yyyyMMdd");
boolean lock = redisValueCache.getLock(key,2, TimeUnit.DAYS);
boolean lock = globalRedisValueCache.getLock(key,2, TimeUnit.DAYS);
if (!lock) {
logger.info("The competition failure,other get task.");
return;
}
logger.info("get this task,ip is {}",LocalhostIpFetcher.fetchLocalIP());
//今天更新的数据
... ...
... ... @@ -3,6 +3,10 @@ redis:
servers:
- 192.168.102.45:6379
auth: redis9646
yohoGlobalRedis :
servers:
- 192.168.102.45:6379
auth: redis9646
yohoSyncRedis :
servers:
- 192.168.102.45:6379
... ...