server: Only use a single connection with SQlite

Several writer connections can lock the DB and cause other inserts to fail.

A single connection should be enough given the usual workloads
This commit is contained in:
Valentin Tolmer
2024-10-30 15:31:48 +01:00
committed by nitnelave
parent 35fe521cbe
commit 143eb70bee
2 changed files with 12 additions and 1 deletions

View File

@@ -17,6 +17,12 @@ impl From<&str> for DatabaseUrl {
}
}
impl DatabaseUrl {
pub fn db_type(&self) -> &str {
self.0.scheme()
}
}
impl std::fmt::Debug for DatabaseUrl {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
if self.0.password().is_some() {