-
Notifications
You must be signed in to change notification settings - Fork 1
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
Make sure to set max connection to 1 #45
Changes from all commits
baf6bb4
5118dd1
f551c11
7b324e9
16f3269
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[toolchain] | ||
channel = "1.74.0" | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4,7 +4,7 @@ use std::{ | |||||||||||
}; | ||||||||||||
|
||||||||||||
use sqlx::{ | ||||||||||||
sqlite::{SqliteConnectOptions, SqliteJournalMode, SqliteRow}, | ||||||||||||
sqlite::{SqliteConnectOptions, SqliteJournalMode, SqlitePoolOptions, SqliteRow}, | ||||||||||||
FromRow, Row, SqlitePool, | ||||||||||||
}; | ||||||||||||
|
||||||||||||
|
@@ -348,7 +348,10 @@ impl Writer { | |||||||||||
.journal_mode(SqliteJournalMode::Delete) | ||||||||||||
.filename(path); | ||||||||||||
|
||||||||||||
let pool = SqlitePool::connect_with(opts).await?; | ||||||||||||
let pool = SqlitePoolOptions::new() | ||||||||||||
.max_connections(1) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. since there is already an explicit |
||||||||||||
.connect_with(opts) | ||||||||||||
.await?; | ||||||||||||
Comment on lines
+351
to
+354
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||
|
||||||||||||
sqlx::query(SCHEMA).execute(&pool).await?; | ||||||||||||
|
||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ impl S3Store { | |
.with_path_style(); | ||
|
||
Ok(Self { | ||
bucket: bucket, | ||
bucket, | ||
url: url.to_owned(), | ||
}) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.