Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ details.

#### Methods

`constructor({ schema, transport, getSubjects, options: { batchSize, highWaterMark, noAckStreams, timeout }}`
`constructor({ schema, transport, getSubjects, options: { batchSize, highWaterMark, noAckStream, timeout }}`

* `schema`

Expand Down Expand Up @@ -114,7 +114,7 @@ details.

When set, the stream will push messages in chunks of that size.

* `noAckStreams`
* `noAckStream`

When `true`, allows piping to provider without acknowledgement, i.e. fire
and forget.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pubsub-store",
"version": "0.8.1",
"version": "0.8.2",
"description": "Pub/Sub Store",
"main": "src/index.js",
"scripts": {
Expand Down
14 changes: 6 additions & 8 deletions src/provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,12 @@ const exec = curry((request, { noAckStream, timeout }, query) => new Promise(
// reject query on timeout
// NB: timeout is set in Promise context only when noAckStream
// is false and is cancelled in request callback
tap(partial(clearTimeout, [ !noAckStream
? setTimeout(
partial(reject, [
new ProviderError(`query timeout after ${timeout}ms`, query)
]),
timeout
)
: null
tap(partial(clearTimeout, [ setTimeout(
partial(reject, [
new ProviderError(`query timeout after ${timeout}ms`, query)
]),
timeout
)
])),
JSON.parse,

Expand Down