-
Notifications
You must be signed in to change notification settings - Fork 2
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
Port code to newest mongodb driver #9
Labels
enhancement
New feature or request
Comments
kov
added a commit
that referenced
this issue
Sep 8, 2020
Use a module-global static to hold the client, and initialize it on startup. This allows any code to obtain a connection from the same client regardless of being on the path of a Rocket endpoint or not. Closes #9.
kov
added a commit
that referenced
this issue
Sep 8, 2020
Use a module-global static to hold the client, and initialize it on startup. This allows any code to obtain a connection from the same client regardless of being on the path of a Rocket endpoint or not. Closes #9.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The more recent stable mongodb driver is less quirky. The reason I used 0.3.12 is because that was supported out of the box by Rocket https://rocket.rs/v0.4/guide/state/#databases
Nothing stops us from creating our own managed state, though. Another thing we can consider is updating Rocket's own builtin support to work with newer mongo - rwf2/Rocket#1117
By the way, at the moment we have a thread using a separate way to get a connection. Reworking this code should enable us to streamline WalletDB::get_connection() as well and make everyone use the same pool.
The text was updated successfully, but these errors were encountered: