@nxtedition/lib 19.0.44 → 19.0.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/s3.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/lib",
3
- "version": "19.0.44",
3
+ "version": "19.0.46",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "type": "module",
package/s3.js CHANGED
@@ -7,7 +7,7 @@ import PQueue from 'p-queue'
7
7
  const CONTENT_MD5_EXPR = /^[A-F0-9]{32}$/i
8
8
  const CONTENT_LENGTH_EXPR = /^\d+$/i
9
9
 
10
- const queue = new PQueue({ concurrency: 16 })
10
+ const queue = new PQueue({ concurrency: 8 })
11
11
 
12
12
  export async function upload({ client: s3, signal, logger, partSize = 16e6, params }) {
13
13
  if (s3 == null) {
@@ -103,7 +103,7 @@ export async function upload({ client: s3, signal, logger, partSize = 16e6, para
103
103
  PartNumber: number,
104
104
  Body: new stream.Readable({
105
105
  read() {
106
- for (const chunk of chunks.splice(0)) {
106
+ for (const chunk of chunks) {
107
107
  this.push(chunk)
108
108
  }
109
109
  this.push(null)
@@ -117,7 +117,7 @@ export async function upload({ client: s3, signal, logger, partSize = 16e6, para
117
117
  logger?.warn({ err }, 'part upload failed')
118
118
 
119
119
  if (retryCount < 3) {
120
- logger?.warn({ retryCount }, 'part upload retry')
120
+ logger?.debug({ retryCount }, 'part upload retry')
121
121
  await tp.setTimeout(1e3, undefined, { signal: uploader.signal })
122
122
  } else {
123
123
  uploader.ac.abort(err)