mirror of
https://github.com/iv-org/invidious.git
synced 2024-12-12 21:30:34 +05:30
commit
09f5485889
@ -14,7 +14,7 @@ shards:
|
|||||||
|
|
||||||
db:
|
db:
|
||||||
git: https://github.com/crystal-lang/crystal-db.git
|
git: https://github.com/crystal-lang/crystal-db.git
|
||||||
version: 0.10.1
|
version: 0.13.1
|
||||||
|
|
||||||
exception_page:
|
exception_page:
|
||||||
git: https://github.com/crystal-loot/exception_page.git
|
git: https://github.com/crystal-loot/exception_page.git
|
||||||
@ -34,7 +34,7 @@ shards:
|
|||||||
|
|
||||||
pg:
|
pg:
|
||||||
git: https://github.com/will/crystal-pg.git
|
git: https://github.com/will/crystal-pg.git
|
||||||
version: 0.24.0
|
version: 0.28.0
|
||||||
|
|
||||||
protodec:
|
protodec:
|
||||||
git: https://github.com/iv-org/protodec.git
|
git: https://github.com/iv-org/protodec.git
|
||||||
@ -50,5 +50,5 @@ shards:
|
|||||||
|
|
||||||
sqlite3:
|
sqlite3:
|
||||||
git: https://github.com/crystal-lang/crystal-sqlite3.git
|
git: https://github.com/crystal-lang/crystal-sqlite3.git
|
||||||
version: 0.18.0
|
version: 0.21.0
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ targets:
|
|||||||
dependencies:
|
dependencies:
|
||||||
pg:
|
pg:
|
||||||
github: will/crystal-pg
|
github: will/crystal-pg
|
||||||
version: ~> 0.24.0
|
version: ~> 0.28.0
|
||||||
sqlite3:
|
sqlite3:
|
||||||
github: crystal-lang/crystal-sqlite3
|
github: crystal-lang/crystal-sqlite3
|
||||||
version: ~> 0.18.0
|
version: ~> 0.21.0
|
||||||
kemal:
|
kemal:
|
||||||
github: kemalcr/kemal
|
github: kemalcr/kemal
|
||||||
version: ~> 1.1.2
|
version: ~> 1.1.2
|
||||||
|
@ -22,7 +22,6 @@ struct YoutubeConnectionPool
|
|||||||
response = yield conn
|
response = yield conn
|
||||||
rescue ex
|
rescue ex
|
||||||
conn.close
|
conn.close
|
||||||
|
|
||||||
conn = make_client(url, force_resolve: true)
|
conn = make_client(url, force_resolve: true)
|
||||||
|
|
||||||
response = yield conn
|
response = yield conn
|
||||||
@ -34,7 +33,14 @@ struct YoutubeConnectionPool
|
|||||||
end
|
end
|
||||||
|
|
||||||
private def build_pool
|
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
|
||||||
next make_client(url, force_resolve: true)
|
next make_client(url, force_resolve: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user