Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions opsqueue/app/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ pub async fn async_main() {
// will not be seen otherwise
let prometheus_config = opsqueue::prometheus::setup_prometheus();

let db_pool =
opsqueue::db::open_and_setup(&config.database_filename, config.max_read_pool_size).await;
let db_pool = tokio::time::timeout(
Duration::from_secs(10),
opsqueue::db::open_and_setup(&config.database_filename, config.max_read_pool_size),
)
.await
.expect("Timed out while initiating the database");

moro_local::async_scope!(|scope| {
scope.spawn(opsqueue::server::serve_producer_and_consumer(
Expand Down
Loading