grantcarthew / node-rethinkdb-job-queue

A persistent job or task queue backed by RethinkDB.
https://github.com/grantcarthew/node-rethinkdb-job-queue/wiki
MIT License
157 stars 16 forks source link

Error Event Bug and v3 #55

Closed grantcarthew closed 7 years ago

grantcarthew commented 7 years ago

I had a few hours up my sleeve and decided to write the last couple of tests to get the coverage up.

In doing so I discovered an API design flaw which caused an exception whilst throwing error events.

I posted on the Nodejs Help repository and @bnoordhuis has raised a pull request for Nodejs.

To fix this error I will need to change the public API for rethinkdb-job-queue which in turn means bumping the version up to the next major version due to SemVer.

The specific Public API change will be moving from having the Queue.id as the first argument for all events to having error objects as the first argument for error events. I will add the Queue.id to the error objects before raising the event.

grantcarthew commented 7 years ago

v3 published fixing the error event API issue. Please read Event.error for the error event syntax.