summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-10-29 17:26:24 +0100
committerSamantaz Fox <coding@samantaz.fr>2024-10-29 17:26:24 +0100
commit711d52d47fcff4cc376551a81fba47dcaeb23e0c (patch)
treeadcbf10c56ba375a3c5b0bfad595011ee3599908
parentd8b893e9ad456598a3e127cec578dd3355141578 (diff)
downloadinvidious-711d52d47fcff4cc376551a81fba47dcaeb23e0c.tar.gz
invidious-711d52d47fcff4cc376551a81fba47dcaeb23e0c.tar.bz2
invidious-711d52d47fcff4cc376551a81fba47dcaeb23e0c.zip
Shards: Update database dependencies
-rw-r--r--shard.lock6
-rw-r--r--shard.yml4
-rw-r--r--src/invidious/yt_backend/connection_pool.cr9
3 files changed, 13 insertions, 6 deletions
diff --git a/shard.lock b/shard.lock
index 397bd8bc..1f609631 100644
--- a/shard.lock
+++ b/shard.lock
@@ -14,7 +14,7 @@ shards:
db:
git: https://github.com/crystal-lang/crystal-db.git
- version: 0.10.1
+ version: 0.13.1
exception_page:
git: https://github.com/crystal-loot/exception_page.git
@@ -30,7 +30,7 @@ shards:
pg:
git: https://github.com/will/crystal-pg.git
- version: 0.24.0
+ version: 0.28.0
protodec:
git: https://github.com/iv-org/protodec.git
@@ -46,5 +46,5 @@ shards:
sqlite3:
git: https://github.com/crystal-lang/crystal-sqlite3.git
- version: 0.18.0
+ version: 0.21.0
diff --git a/shard.yml b/shard.yml
index 367f7c73..e0e34c0c 100644
--- a/shard.yml
+++ b/shard.yml
@@ -12,10 +12,10 @@ targets:
dependencies:
pg:
github: will/crystal-pg
- version: ~> 0.24.0
+ version: ~> 0.28.0
sqlite3:
github: crystal-lang/crystal-sqlite3
- version: ~> 0.18.0
+ version: ~> 0.21.0
kemal:
github: kemalcr/kemal
version: ~> 1.1.2
diff --git a/src/invidious/yt_backend/connection_pool.cr b/src/invidious/yt_backend/connection_pool.cr
index ca612083..14cc2d47 100644
--- a/src/invidious/yt_backend/connection_pool.cr
+++ b/src/invidious/yt_backend/connection_pool.cr
@@ -44,7 +44,14 @@ struct YoutubeConnectionPool
end
private def build_pool
- DB::Pool(HTTP::Client).new(initial_pool_size: 0, max_pool_size: capacity, max_idle_pool_size: capacity, checkout_timeout: timeout) do
+ options = DB::Pool::Options.new(
+ initial_pool_size: 0,
+ max_pool_size: capacity,
+ max_idle_pool_size: capacity,
+ checkout_timeout: timeout
+ )
+
+ DB::Pool(HTTP::Client).new(options) do
conn = HTTP::Client.new(url)
conn.family = CONFIG.force_resolve
conn.family = Socket::Family::INET if conn.family == Socket::Family::UNSPEC