mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-07-09 23:18:37 +02:00
fix: change deprecated property for S3 timeout
This commit is contained in:
+2
-3
@@ -16,7 +16,6 @@ import * as archiver from "archiver";
|
|||||||
import { dirname, basename } from "path";
|
import { dirname, basename } from "path";
|
||||||
import AnonymousError from "../AnonymousError";
|
import AnonymousError from "../AnonymousError";
|
||||||
import AnonymizedFile from "../AnonymizedFile";
|
import AnonymizedFile from "../AnonymizedFile";
|
||||||
import { AnonymizeTransformer } from "../anonymize-utils";
|
|
||||||
|
|
||||||
export default class S3Storage implements StorageBase {
|
export default class S3Storage implements StorageBase {
|
||||||
type = "AWS";
|
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_ID) throw new Error("S3_CLIENT_ID not set");
|
||||||
if (!config.S3_CLIENT_SECRET) throw new Error("S3_CLIENT_SECRET not set");
|
if (!config.S3_CLIENT_SECRET) throw new Error("S3_CLIENT_SECRET not set");
|
||||||
return new S3({
|
return new S3({
|
||||||
@@ -39,7 +38,7 @@ export default class S3Storage implements StorageBase {
|
|||||||
region: config.S3_REGION,
|
region: config.S3_REGION,
|
||||||
endpoint: config.S3_ENDPOINT,
|
endpoint: config.S3_ENDPOINT,
|
||||||
requestHandler: new NodeHttpHandler({
|
requestHandler: new NodeHttpHandler({
|
||||||
socketTimeout: timeout,
|
requestTimeout: timeout,
|
||||||
connectionTimeout: timeout,
|
connectionTimeout: timeout,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user