Retry initial db connection, with adjustable option

This commit is contained in:
Daniel García
2020-10-03 22:31:52 +02:00
parent 22b9c80007
commit 729c9cff41
5 changed files with 49 additions and 12 deletions

View File

@ -268,7 +268,7 @@ fn check_web_vault() {
}
fn launch_rocket(extra_debug: bool) {
let pool = match db::DbPool::from_config() {
let pool = match util::retry_db(db::DbPool::from_config, CONFIG.db_connection_retries()) {
Ok(p) => p,
Err(e) => {
error!("Error creating database pool: {:?}", e);