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

Consider accepting an existing rethinkdbdash connection #44

Closed chrisabrams closed 7 years ago

chrisabrams commented 7 years ago

I'm working on a larger project which is trying to retain a single connection pool. Throughout the project I create many jobs using this wonderful library. I'd like to request the option to pass r to the job to utilize an existing connection pool, rather than making another.

I've considered replacing q.r but thought there might be a more elegant way of handling this?

grantcarthew commented 7 years ago

That was done in v1 Chris. Read the top of this page: https://github.com/grantcarthew/node-rethinkdb-job-queue/wiki/Queue-Connection

@chrisabrams

chrisabrams commented 7 years ago

@grantcarthew oh I get it now; you can pass r as the options to the queue itself. That is great news :) Thanks!