Add rescue for video ranking

This commit is contained in:
Omar Roth 2018-03-16 23:57:31 -05:00
parent 2be57276a2
commit 39df8ab200
2 changed files with 6 additions and 2 deletions

View file

@ -147,7 +147,11 @@ spawn do
top.each do |id|
client = get_client(youtube_pool)
videos << get_video(id, client, PG_DB)
begin
videos << get_video(id, client, PG_DB)
rescue ex
STDOUT << Time.now << " : " << ex.message << "\n"
end
youtube_pool << client
end