From a565d32782d62ddcca9fa97464ce476f8a9711b4 Mon Sep 17 00:00:00 2001 From: YXY <932687738@qq.com> Date: Mon, 9 Oct 2023 21:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E9=94=99=E9=87=8D=E7=BD=AE=E5=92=8C?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java index 96f871a..3d8c028 100644 --- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java +++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/CJT/SyncAccountsJobAbstract.java @@ -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; }