修复重试逻辑

This commit is contained in:
shikong 2023-09-09 23:05:30 +08:00
parent ef6c164c0f
commit 707c38da72

View File

@ -127,7 +127,7 @@ public class WvpService {
try { try {
genericRetryer.call(() -> video(asyncResponse, deviceCode, deviceId, channelId, startTime, endTime)); genericRetryer.call(() -> video(asyncResponse, deviceCode, deviceId, channelId, startTime, endTime));
} catch (RetryException e) { } catch (RetryException e) {
String reason = MessageFormat.format("查询失败, 已重试 {0} 次", e.getNumberOfFailedAttempts()); String reason = MessageFormat.format("调用 wvp api 查询设备历史失败, 已重试 {0} 次", e.getNumberOfFailedAttempts());
log.error(reason); log.error(reason);
writeErrorToResponse(asyncResponse, JsonResponse.error(reason)); writeErrorToResponse(asyncResponse, JsonResponse.error(reason));
} catch (Exception e) { } catch (Exception e) {