mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-28 02:21:24 +00:00
Add fix for channel job
This commit is contained in:
@@ -83,9 +83,13 @@ crawl_threads.times do
|
||||
end
|
||||
end
|
||||
|
||||
total_channels = PG_DB.query_one("SELECT count(*) FROM channels", as: Int64)
|
||||
channel_threads.times do |i|
|
||||
limit = total_channels / channel_threads
|
||||
offset = limit.not_nil! * i
|
||||
|
||||
spawn do
|
||||
refresh_channels(PG_DB)
|
||||
refresh_channels(PG_DB, limit, offset)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user