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

Port code to newest mongodb driver #9

Closed
kov opened this issue Sep 7, 2020 · 0 comments · Fixed by #16
Closed

Port code to newest mongodb driver #9

kov opened this issue Sep 7, 2020 · 0 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@kov
Copy link
Contributor

kov commented Sep 7, 2020

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.

@kov kov added the enhancement New feature or request label Sep 7, 2020
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 kov closed this as completed in #16 Sep 8, 2020
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
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant