fix: database connections now scale linearly with number of subworkers

This commit is contained in:
Ruben Fiszel
2024-07-30 17:45:03 +02:00
parent 6bc77f9523
commit 66ba60fee8
+2 -1
View File
@@ -222,11 +222,12 @@ pub async fn connect_db(
DEFAULT_MAX_CONNECTIONS_INDEXER
} else {
DEFAULT_MAX_CONNECTIONS_WORKER
* std::env::var("NUM_WORKERS")
+ std::env::var("NUM_WORKERS")
.ok()
.map(|x| x.parse().ok())
.flatten()
.unwrap_or(1)
- 1
}
}
}