Skip to content
This repository was archived by the owner on Oct 21, 2025. It is now read-only.

Commit d9ef57c

Browse files
committed
more pool connections
1 parent 87e2db3 commit d9ef57c

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ DATABASE_URL="postgresql://blueprint_api:local@db:5432/blueprint_api"
33

44
DATABASE_MIGRATE=true
55
UPDATE_PRICES=true
6+
67
PORT=8000
78
INTERNAL_KEY="HKj5LZnavEfjqYDTEUi" # random string, if leaked change ASAP
89

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<br/><h2 align="center">🧩 Development</h2>
1111
```bash
1212
# Clone the repository
13-
git clone https://github.com/BlueprintFramework/api.git
14-
cd api
13+
git clone https://github.com/BlueprintFramework/api.git blueprint-api
14+
cd blueprint-api
1515

1616
# Install dependencies
1717
cargo build

src/database.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ impl Database {
1414
let instance = Self {
1515
write: match &env.database_url_primary {
1616
Some(url) => PgPoolOptions::new()
17-
.max_connections(5)
17+
.max_connections(25)
1818
.test_before_acquire(false)
1919
.connect(url)
2020
.await
2121
.unwrap(),
2222

2323
None => PgPoolOptions::new()
24-
.max_connections(5)
24+
.max_connections(25)
2525
.test_before_acquire(false)
2626
.connect(&env.database_url)
2727
.await
@@ -30,7 +30,7 @@ impl Database {
3030
read: if env.database_url_primary.is_some() {
3131
Some(
3232
PgPoolOptions::new()
33-
.max_connections(5)
33+
.max_connections(25)
3434
.test_before_acquire(false)
3535
.connect(&env.database_url)
3636
.await

src/telemetry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl TelemetryLogger {
119119
Some(())
120120
}
121121

122-
async fn lookup_ips(&self, ips: &[String]) -> HashMap<String, (String, String)> {
122+
async fn lookup_ips(&self, ips: &[&str]) -> HashMap<String, (String, String)> {
123123
let mut result = HashMap::new();
124124

125125
let data = reqwest::Client::new()
@@ -176,7 +176,7 @@ impl TelemetryLogger {
176176
.lookup_ips(
177177
telemetry
178178
.iter()
179-
.map(|t| t.ip.clone())
179+
.map(|t| t.ip.as_str())
180180
.collect::<Vec<_>>()
181181
.as_slice(),
182182
)

0 commit comments

Comments
 (0)