From deba2b567e21cfe53aac5fe28021a7c539353960 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 3 May 2023 08:34:14 +0200 Subject: [PATCH] fix: change deprecated property for S3 timeout --- src/storage/S3.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/storage/S3.ts b/src/storage/S3.ts index 2aaa1c9..b2d1835 100644 --- a/src/storage/S3.ts +++ b/src/storage/S3.ts @@ -16,7 +16,6 @@ import * as archiver from "archiver"; import { dirname, basename } from "path"; import AnonymousError from "../AnonymousError"; import AnonymizedFile from "../AnonymizedFile"; -import { AnonymizeTransformer } from "../anonymize-utils"; export default class S3Storage implements StorageBase { type = "AWS"; @@ -28,7 +27,7 @@ export default class S3Storage implements StorageBase { }); } - private client(timeout = 5000) { + private client(timeout = 10000) { if (!config.S3_CLIENT_ID) throw new Error("S3_CLIENT_ID not set"); if (!config.S3_CLIENT_SECRET) throw new Error("S3_CLIENT_SECRET not set"); return new S3({ @@ -39,7 +38,7 @@ export default class S3Storage implements StorageBase { region: config.S3_REGION, endpoint: config.S3_ENDPOINT, requestHandler: new NodeHttpHandler({ - socketTimeout: timeout, + requestTimeout: timeout, connectionTimeout: timeout, }), });