@miso.ai/server-commons 0.6.5-beta.3 → 0.6.5-beta.5

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.
package/package.json CHANGED
@@ -21,5 +21,5 @@
21
21
  "uuid": "^9.0.0",
22
22
  "yargs": "^17.5.1"
23
23
  },
24
- "version": "0.6.5-beta.3"
24
+ "version": "0.6.5-beta.5"
25
25
  }
package/src/sink/bps.js CHANGED
@@ -12,7 +12,7 @@ export default class BpsSink {
12
12
 
13
13
  _normalizeOptions({
14
14
  recordsPerSecord = 100000,
15
- bytesPerSecond = 4 * 1024 * 1024,
15
+ bytesPerSecond = 10 * 1024 * 1024,
16
16
  ...options
17
17
  } = {}) {
18
18
  return {
@@ -85,6 +85,7 @@ export default class BufferedReadStream extends Readable {
85
85
  const request = this._state.request(this._source.request());
86
86
 
87
87
  this._debug(`[BufferedReadStream] Load request: ${request}`);
88
+ // TODO: racing here! we need to somehow keep the order of loads
88
89
  const { data, ...info } = await this._source.get(request);
89
90
  const response = new Response(request, info);
90
91
  this._debug(`[BufferedReadStream] Load response: ${JSON.stringify(response)} => data = ${data && data.length}`);