Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into staging
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Sobolev <[email protected]>
  • Loading branch information
haiodo committed Oct 25, 2024
2 parents 4be3017 + 30a9c07 commit 0df9725
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
6 changes: 5 additions & 1 deletion common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion server/s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@hcengineering/storage": "^0.6.0",
"@aws-sdk/client-s3": "^3.575.0",
"@aws-sdk/s3-request-presigner": "^3.582.0",
"@aws-sdk/lib-storage": "^3.583.0"
"@aws-sdk/lib-storage": "^3.583.0",
"@smithy/node-http-handler": "^3.0.0"
}
}
11 changes: 10 additions & 1 deletion server/s3/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

import { CopyObjectCommand, PutObjectCommand, S3 } from '@aws-sdk/client-s3'
import { Upload } from '@aws-sdk/lib-storage'
import { NodeHttpHandler } from '@smithy/node-http-handler'
import { Agent as HttpAgent } from 'http'
import { Agent as HttpsAgent } from 'https'

import core, {
toWorkspaceString,
Expand Down Expand Up @@ -70,7 +73,13 @@ export class S3Service implements StorageAdapter {
accessKeyId: opt.accessKey,
secretAccessKey: opt.secretKey
},
region: opt.region ?? 'auto'
region: opt.region ?? 'auto',
requestHandler: new NodeHttpHandler({
connectionTimeout: 5000,
socketTimeout: 120000,
httpAgent: new HttpAgent({ maxSockets: 500, keepAlive: true }),
httpsAgent: new HttpsAgent({ maxSockets: 500, keepAlive: true })
})
})

this.expireTime = parseInt(this.opt.expireTime ?? '168') * 3600 // use 7 * 24 - hours as default value for expireF
Expand Down

0 comments on commit 0df9725

Please sign in to comment.