修改日志信息
continuous-integration/drone/push Build is passing Details

沃森川job同步飞书
YXY 1 year ago
parent 7c15ae0460
commit e751d78645

@ -106,7 +106,11 @@ public abstract class SyncAccountsJobAbstract {
private String buildRobotErrorMessage(Exception e){ private String buildRobotErrorMessage(Exception e){
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("同步任务",getClassName()); jsonObject.put("同步任务",getClassName());
jsonObject.put("异常信息",e.getMessage()); String errorMessage = e.getMessage();
if (org.apache.commons.lang3.StringUtils.isNotBlank(errorMessage)){
errorMessage = errorMessage.replaceAll("\\\\","");
}
jsonObject.put("异常信息", errorMessage);
return jsonObject.toJSONString(); return jsonObject.toJSONString();
} }
@ -347,7 +351,7 @@ public abstract class SyncAccountsJobAbstract {
JSONObject value = body.getJSONObject("value"); JSONObject value = body.getJSONObject("value");
String token = value.getString("accessToken"); String token = value.getString("accessToken");
context.setOpenToken(token); context.setOpenToken(token);
redisCache.setCacheObject(RedisConstants.CJT_TOKEN_CACHE_KEY,token,10, TimeUnit.MINUTES); redisCache.setCacheObject(RedisConstants.CJT_TOKEN_CACHE_KEY,token,5, TimeUnit.MINUTES);
return token; return token;
}else{ }else{
context.setOpenToken(openToken); context.setOpenToken(openToken);

Loading…
Cancel
Save