timeout closing db pool

This commit is contained in:
Ruben Fiszel
2024-03-21 08:54:23 +01:00
parent 182dff098f
commit 9f7bbb45f0
+3 -1
View File
@@ -566,8 +566,10 @@ Windmill Community Edition {GIT_VERSION}
_ = db.close() => {
tracing::info!("Database connection pool closed");
},
_ = tokio::time::sleep(Duration::from_secs(15)) => {
tracing::warn!("Could not close database connection pool in time (15s). Exiting anyway.");
}
}
db.close().await;
Ok(())
}