|
|
|
@ -35,7 +35,9 @@ import java.util.UUID; |
|
|
|
public class IvsResourceRetryableDelegate { |
|
|
|
private static final Logger log = LoggerFactory.getLogger(IvsResourceRetryableDelegate.class); |
|
|
|
|
|
|
|
private static final int RETRYABLE_MAX = 10; |
|
|
|
private static final int RETRYABLE_MIN = 10; |
|
|
|
|
|
|
|
private static final int RETRYABLE_MAX = 20; |
|
|
|
|
|
|
|
@Resource |
|
|
|
private IvsCommonService ivsCommonService; |
|
|
|
@ -55,7 +57,7 @@ public class IvsResourceRetryableDelegate { |
|
|
|
log.info("URI_PLATFORM_SNAPSHOT SUCCESS retryCount: {}, UUID: {}", retryCount, ivsDevChanSnapVo.getUUID()); |
|
|
|
} catch (Exception e) { |
|
|
|
log.info("URI_PLATFORM_SNAPSHOT FAIL retryCount: {}, UUID: {}", retryCount, ivsDevChanSnapVo.getUUID()); |
|
|
|
throw new IOException("URI_PLATFORM_SNAPSHOT FAIL UUID: " + ivsDevChanSnapVo.getUUID()); |
|
|
|
throw new IOException("URI_PLATFORM_SNAPSHOT FAIL UUID: " + ivsDevChanSnapVo.getUUID() + ", retryCount: " + retryCount); |
|
|
|
} |
|
|
|
|
|
|
|
return ivsSnapshotView; |
|
|
|
@ -70,7 +72,7 @@ public class IvsResourceRetryableDelegate { |
|
|
|
|
|
|
|
@Retryable( |
|
|
|
value = IOException.class, |
|
|
|
maxAttempts = RETRYABLE_MAX, |
|
|
|
maxAttempts = RETRYABLE_MIN, |
|
|
|
backoff = @Backoff(delay = 2000)) // 每次重试间隔 2 秒 |
|
|
|
public IvsPlatformSnapshotView getSnapshotListRetryable(final IvsChanSnapVo ivsChanSnapVo) throws IOException { |
|
|
|
int retryCount = RetrySynchronizationManager.getContext() != null |
|
|
|
@ -98,7 +100,7 @@ public class IvsResourceRetryableDelegate { |
|
|
|
|
|
|
|
@Retryable( |
|
|
|
value = IOException.class, |
|
|
|
maxAttempts = RETRYABLE_MAX, |
|
|
|
maxAttempts = RETRYABLE_MIN, |
|
|
|
backoff = @Backoff(delay = 2000)) // 每次重试间隔 2 秒 |
|
|
|
public ResponseEntity<InputStreamResource> downloadPictureRetryable(String uuid, String pictureUrl) throws IOException { |
|
|
|
int retryCount = RetrySynchronizationManager.getContext() != null |
|
|
|
|