Log usage

This commit is contained in:
Dominik Werder
2025-05-26 16:31:10 +02:00
parent 195d550781
commit c17032db23
12 changed files with 224 additions and 91 deletions

View File

@@ -10,7 +10,7 @@ pub type PgClient = Client;
pub async fn make_pg_client(dbconf: &Database) -> Result<(PgClient, JoinHandle<Result<(), Error>>), Error> {
let d = dbconf;
let url = format!("postgresql://{}:{}@{}:{}/{}", d.user, d.pass, d.host, d.port, d.name);
info!("connect to {url}");
info!("connect to {}", url);
let (client, pg_conn) = tokio_postgres::connect(&url, tokio_postgres::tls::NoTls).await?;
// TODO allow clean shutdown on ctrl-c and join the pg_conn in the end:
let jh = tokio::spawn(async move {