File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ import { env } from "../env";
99import type { PutObjectCommandInput } from "@aws-sdk/client-s3" ;
1010import type { CommandInput } from "s3-sync-client" ;
1111
12+ const retryStrategy = new ConfiguredRetryStrategy ( 5 , 60_000 ) ;
13+
1214const client = new S3 ( {
1315 endpoint : env . S3_ENDPOINT ,
1416 region : env . S3_REGION ,
@@ -17,13 +19,10 @@ const client = new S3({
1719 secretAccessKey : env . S3_SECRET_KEY ,
1820 } ,
1921 logger : console ,
20- retryStrategy : new ConfiguredRetryStrategy (
21- 10 ,
22- ( attempt ) => 1000 + attempt * 1000 ,
23- ) ,
22+ retryStrategy,
2423} ) ;
2524
26- const { sync } = new S3SyncClient ( { client } ) ;
25+ const { sync } = new S3SyncClient ( { client, retryStrategy } ) ;
2726
2827export async function syncFromS3 ( remotePath : string , localPath : string ) {
2928 await sync ( `s3://${ env . S3_BUCKET } /${ remotePath } ` , localPath ) ;
You can’t perform that action at this time.
0 commit comments