node-rethinkdb-job-queue icon indicating copy to clipboard operation
node-rethinkdb-job-queue copied to clipboard

fetch jobs from jobqueue on rethinkdb reconnect

Open mohit5540 opened this issue 7 years ago • 3 comments
trafficstars

@grantcarthew @zllovesuki

With reference to #85, #72 we are able to reconnect rethinkdb through 'pingInterval' option. Now the problem is, even though rethinkdb gets connected, JobQueue does not start taking jobs again. script needs to restart again.

@grantcarthew I know you are working on other project at the moment, but some help in this regard will be highly appreciated.

Thanks

mohit5540 avatar Aug 14 '18 05:08 mohit5540

Hi again @mohit5540,

In the best possible way I would like you to be aware of this blog article: I thought I understood open source, I was wrong

With that in mind I am very happy to add maintainers (collaborators) to the project to prevent the project being fragmented.

I believe most of the functionality you are after is with the change-feed-reconnect that is discussed in #77. This will fix the re-connection issues. Once re-connect is working then a simple call to queueProcess.restart will restart processing.

I have created a PR #87 that will add rethinkdb-changefeed-reconnect. Either work with this or create your own. If you want to keep the work to a minimum you could simply expose queueProcess.restart as a public API method so you can call it yourself.

You will need to call queueProcess.restart on reconnect. If the rethinkdb-changefeed-reconnect doesn't have a related event then an internal connection status poll or something like that would do the job. That's were you come in 👍 .

Feel free to keep asking questions. Happy to help were I can.

grantcarthew avatar Aug 15 '18 23:08 grantcarthew

I just had a look and the Queue.resume public API call could work if you want to just restart processing. A Queue.restart would be a good addition to the package though.

grantcarthew avatar Aug 15 '18 23:08 grantcarthew

ping @mohit5540

grantcarthew avatar Sep 16 '18 23:09 grantcarthew