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

The readme mentions a callback as 2nd param but there is no callback made #12

Closed
travischoma opened this issue May 25, 2014 · 2 comments

Comments

@travischoma
Copy link

If I use MongoStore(opts,cb) the cb is never called. Doesn't look like there is code to trigger the callback.

@diversario
Copy link
Owner

Right. The text is from when Db#open was called immediately in the constructor; I removed that in favor of doing lazy open. Database is going to be opened when set, get, destroy, length or clear is called. I'll update the README.

@travischoma
Copy link
Author

fwiw I forked it to do the open in the constructor again. Needed to get a callback when it was properly connected to my repl set before proceeding with the rest of the express configuration, the lazy loading was causing this error on the first request of my app after server restart: Error setting TTL index on collection : <Error: Error setting TTL index on collection : <Error: No replica set primary available for query with ReadPreference PRIMARY>> type errors when the web app launched before it was fully connected.

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

No branches or pull requests

2 participants