Skip to content

Commit

Permalink
Increase timeout for seed pool
Browse files Browse the repository at this point in the history
  • Loading branch information
Heliozoa committed Jul 12, 2023
1 parent dc83a2c commit 8d8f827
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/headless-lms/server/src/programs/seed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod seed_playground_examples;
pub mod seed_roles;
pub mod seed_users;

use std::{env, process::Command, sync::Arc};
use std::{env, process::Command, sync::Arc, time::Duration};

use crate::{domain::models_requests::JwtKey, setup_tracing};

Expand Down Expand Up @@ -69,6 +69,8 @@ async fn setup_seed_environment() -> anyhow::Result<Pool<Postgres>> {
let db_pool = PgPoolOptions::new()
.max_connections(10)
.min_connections(5)
// the seed process can take a while, default is 30
.acquire_timeout(Duration::from_secs(90))
.connect(&db_url)
.await?;

Expand Down

0 comments on commit 8d8f827

Please sign in to comment.