Skip to content

Commit

Permalink
fix: remove redundant option
Browse files Browse the repository at this point in the history
  • Loading branch information
tractorcow committed Jul 18, 2023
1 parent aaa39ac commit c3eed46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions gatsby-plugin-s3/src/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const deploy = async ({ yes, bucket, userAgent }: DeployArguments = {}) =
}

const agent = makeAgent()
const maxRetryAttempts = config.maxRetryAttempts || DEFAULT_OPTIONS.maxRetries as number
const maxRetries = config.maxRetries || DEFAULT_OPTIONS.maxRetries as number
const s3 = new S3({
region: config.region,
endpoint: config.customAwsEndpointHostname,
Expand All @@ -171,8 +171,8 @@ export const deploy = async ({ yes, bucket, userAgent }: DeployArguments = {}) =
}),
logger: config.verbose ? console : undefined,
retryStrategy: config.fixedRetryDelay
? new ConfiguredRetryStrategy(maxRetryAttempts, config.fixedRetryDelay)
: new StandardRetryStrategy(maxRetryAttempts),
? new ConfiguredRetryStrategy(maxRetries, config.fixedRetryDelay)
: new StandardRetryStrategy(maxRetries),
});

const { exists, region } = await getBucketInfo(config, s3);
Expand Down
5 changes: 1 addition & 4 deletions gatsby-plugin-s3/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ export interface S3PluginOptions extends PluginOptions {
// Use this option to use a fixed retry delay instead of exponential for particularly flaky connections
fixedRetryDelay?: number;

// Max number of retry attempts.
maxRetryAttempts?: number;

// Whether or not the plugin should output verbose logs from S3 uploads
verbose?: boolean;
}
Expand All @@ -131,7 +128,7 @@ export const DEFAULT_OPTIONS: S3PluginOptions = {
retainObjectsPatterns: [],
enableS3StaticWebsiteHosting: true,
parallelLimit: 20,
maxRetryAttempts: 3,
maxRetries: 3,

// the typing requires this for some reason...
plugins: [],
Expand Down

0 comments on commit c3eed46

Please sign in to comment.