mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Add error handling for channel refresh
This commit is contained in:
parent
6cb5072961
commit
0c5b92a6cb
1 changed files with 8 additions and 2 deletions
|
@ -140,8 +140,14 @@ channel_threads.times do |i|
|
||||||
PG_DB.query(query, i, channel_threads) do |rs|
|
PG_DB.query(query, i, channel_threads) do |rs|
|
||||||
rs.each do
|
rs.each do
|
||||||
client = get_client(youtube_pool)
|
client = get_client(youtube_pool)
|
||||||
id = rs.read(String)
|
begin
|
||||||
channel = get_channel(id, client, PG_DB)
|
id = rs.read(String)
|
||||||
|
channel = get_channel(id, client, PG_DB)
|
||||||
|
rescue ex
|
||||||
|
STDOUT << id << " : " << ex.message << "\n"
|
||||||
|
youtube_pool << make_client(YT_URL)
|
||||||
|
next
|
||||||
|
end
|
||||||
youtube_pool << client
|
youtube_pool << client
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue