报错重置和缓存时间
continuous-integration/drone/push Build is passing Details

master
YXY 1 year ago
parent 67d9259e4f
commit a565d32782

@ -191,7 +191,10 @@ public abstract class SyncAccountsJobAbstract {
String asynchronous = getAsynchronousKey(cjt);
redisCache.deleteObject(asynchronous);
} else {
larkRobotHelper.sendMessageByBot(ROBOT_GROUP, buildRobotErrorCountMessage2(e, queryFromTime,queryToTime));
String errorInfo = buildRobotErrorCountMessage2(e, queryFromTime, queryToTime);
if (!StringUtils.isEmpty(errorInfo) && !errorInfo.contains("openToken已失效")) {
larkRobotHelper.sendMessageByBot(ROBOT_GROUP, errorInfo);
}
// CJTRetryRequest request = new CJTRetryRequest(now, 1, cjt);
// redisCache.rightPush(getRetryKey(cjt), request);
}
@ -492,7 +495,7 @@ public abstract class SyncAccountsJobAbstract {
body.put(larkLabel, this.changeValueType(value, cjtSyncTypeRelation));
}
uniqueKey = String.join("_", uniqueKeyList).toUpperCase() + "_" + addRecordRequest.getAppTable();
Boolean existFlag = redisCache.setCacheObjectIfAbsent("CJT_JOB_CACHE:"+uniqueKey, "1", 5L, TimeUnit.MINUTES);
Boolean existFlag = redisCache.setCacheObjectIfAbsent("CJT_JOB_CACHE:"+uniqueKey, "1", 2L, TimeUnit.HOURS);
if (repeatMap.containsKey(uniqueKey) || !existFlag) {
continue;
}

Loading…
Cancel
Save