-
Notifications
You must be signed in to change notification settings - Fork 119
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
Feature request: r2d2_sqlite connection pooling support #79
Comments
i am going to close this for now |
The issue is that you would want to apply refinery migrations only once when the pool is being created. |
Turns out we can take a connection for r2d2's connection pool and use with let pool = r2d2::Pool::builder()
.max_size(8)
.build(manager)
.expect("Unable to initialize SQLite connection pool");
refinery::embed_migrations!("./migrations");
migrations::runner()
.run(pool.get().unwrap().deref_mut())
.unwrap(); |
Does refinery have an option to support r2d2_sqlite for connection pooling?
The specific error I'm getting is as follows:
I'm having to use connection pooling here because I'm setting up a web server with actix, and I'm storing my db connection in my global state object, which is access by multiple threads I assume that actix is spawning.
The text was updated successfully, but these errors were encountered: