This commit is contained in:
2023-08-29 21:34:01 +02:00
parent d5fdf4fb48
commit 1a7a0ce585
6 changed files with 28 additions and 22 deletions

View File

@@ -43,13 +43,14 @@ async fn simple_handler(State(state): State<AppState>) -> &'static str {
SqlitePoolOptions::new()
.max_connections(5)
.connect_with(
SqliteConnectOptions::from_str("/tmp/tmp.SmE1WKBVMf")
SqliteConnectOptions::from_str("/tmp/tmp.JKl26kmKW5")
.unwrap()
.log_statements(log::LevelFilter::Warn)
.log_slow_statements(
log::LevelFilter::Warn,
std::time::Duration::from_millis(100),
)
.tracing_span(tracing::warn_span!("packager::sqlx"))
.pragma("foreign_keys", "1"),
)
.await
@@ -66,7 +67,7 @@ async fn simple_handler(State(state): State<AppState>) -> &'static str {
.await
.unwrap()
}
// .instrument(tracing::warn_span!("test_span"))
.instrument(tracing::warn_span!("packager::sqlx"))
.await;
"ok"
}