Skip to content

Commit

Permalink
refactor: rename concurrency const to match option
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw committed Sep 14, 2023
1 parent a767299 commit 462c8a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/upload-client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ShardingStream } from './sharding.js'
export { Store, Upload, UnixFS, CAR }
export * from './sharding.js'

const CONCURRENT_UPLOADS = 3
const CONCURRENT_REQUESTS = 3

/**
* Uploads a file to the service and returns the root data CID for the
Expand Down Expand Up @@ -116,7 +116,7 @@ async function uploadBlockStream(conf, blocks, options = {}) {
const shards = []
/** @type {import('./types').AnyLink?} */
let root = null
const concurrency = options.concurrentRequests ?? CONCURRENT_UPLOADS
const concurrency = options.concurrentRequests ?? CONCURRENT_REQUESTS
await blocks
.pipeThrough(new ShardingStream(options))
.pipeThrough(new Parallel(concurrency, async car => {
Expand Down

0 comments on commit 462c8a4

Please sign in to comment.