Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of improvements #91

Open
grantcarthew opened this issue Nov 27, 2019 · 1 comment
Open

List of improvements #91

grantcarthew opened this issue Nov 27, 2019 · 1 comment

Comments

@grantcarthew
Copy link
Owner

Improvements for the queue

I am working on a new job queue backed by MongoDB.

This issue is to list items that could improve rethinkdb-job-queue that pop into mind whilst working on the new queue.

I don't plan on implementing these changes, they are for someone else who want's to upgrade this package.

Move DB Connection Function

Move the database connection from the constructor to a queue.connect() method. This allows to user to receive the returned promise and respond to errors.

Retry the DB Connection

If the database becomes disconnected, instead of crashing, go into a pause state and retry the connection periodically.

Prevent Exceptions

This is a module within a larger application. It should not bring down the application if something goes wrong. Add options to log rather than throw exceptions.

Place Job Data into a Job.data Property

Change the way jobs are created to put the user data into an extra property such as data. This separates job attributes from work to be done.

@grantcarthew
Copy link
Owner Author

I'm scrapping the idea of building a job queue on MongoDB. It is such a bad database for something like this.

For reference: https://blog.meteor.com/mongodb-queries-dont-always-return-all-matching-documents-654b6594a827

I'll leave this here for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant