src/main/java/edu/ucla/library/bucketeer/verticles/S3BucketVerticle.java
private void retryUpload(final String aImageID, final Message<JsonObject> aMessage) {
        shouldRetry(aImageID, retryCheck -> {
            if (retryCheck.succeeded()) {
                if (retryCheck.result()) {
                    sendReply(aMessage, 0, Op.RETRY);
                } else {
                    final String message = LOGGER.getMessage(MessageCodes.BUCKETEER_140, myMaxRetries, aImageID);
                    sendReply(aMessage, CodeUtils.getInt(MessageCodes.BUCKETEER_000), message);
                }
            } else {
                final Throwable retryException = retryCheck.cause();
                final String details = retryException.getMessage();

                LOGGER.error(retryException, MessageCodes.BUCKETEER_134, details);

                // If we have an exception, don't retry... just log the issue
                sendReply(aMessage, CodeUtils.getInt(MessageCodes.BUCKETEER_134), details);
            }
        });
    }
/**
     * A more tentative retry attempt. We count the number of times we've retried and give up after a certain point.
     *
     * @param aImageID An image ID to retry
     * @param aMessage A message to respond to with the retry request (or exception if we've failed)
     */
A more tentative retry attempt. We count the number of times we've retried and give up after a certain point.
@param aImageID An image ID to retry
@param aMessage A message to respond to with the retry request (or exception if we've failed)
A more tentative retry attempt . We count the number of times we ' ve retried and give up after a certain point . @param aImageID An image ID to retry @param aMessage A message to respond to with the retry request ( or exception if we ' ve failed )
private void retryUpload(final String aImageID, final Message<JsonObject> aMessage) {
        shouldRetry(aImageID, retryCheck -> {
            if (retryCheck.succeeded()) {
                if (retryCheck.result()) {
                    sendReply(aMessage, 0, Op.RETRY);
                } else {
                    final String message = LOGGER.getMessage(MessageCodes.BUCKETEER_140, myMaxRetries, aImageID);
                    sendReply(aMessage, CodeUtils.getInt(MessageCodes.BUCKETEER_000), message);
                }
            } else {
                final Throwable retryException = retryCheck.cause();
                final String details = retryException.getMessage();
                LOGGER.error(retryException, MessageCodes.BUCKETEER_134, details);
                sendReply(aMessage, CodeUtils.getInt(MessageCodes.BUCKETEER_134), details);
            }
        });
    }
private void retryUpload ( final String aImageID , final Message < JsonObject > aMessage ) { shouldRetry ( aImageID , retryCheck -> { if ( retryCheck . succeeded ( ) ) { if ( retryCheck . result ( ) ) { sendReply ( aMessage , 0 , Op . RETRY ) ; } else { final String message = LOGGER . getMessage ( MessageCodes . BUCKETEER_140 , myMaxRetries , aImageID ) ; sendReply ( aMessage , CodeUtils . getInt ( MessageCodes . BUCKETEER_000 ) , message ) ; } } else { final Throwable retryException = retryCheck . cause ( ) ; final String details = retryException . getMessage ( ) ; LOGGER . error ( retryException , MessageCodes . BUCKETEER_134 , details ) ; sendReply ( aMessage , CodeUtils . getInt ( MessageCodes . BUCKETEER_134 ) , details ) ; } } ) ; }
A more tentative retry attempt.
A more tentative retry attempt .
// If we have an exception, don't retry... just log the issue