Switch to #sort_by! in pull_popular_videos job

pull/2428/head
syeopite 3 years ago
parent 17e481c107
commit e2bbc9a6fa
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

@ -15,7 +15,7 @@ class Invidious::Jobs::PullPopularVideosJob < Invidious::Jobs::BaseJob
def begin def begin
loop do loop do
videos = db.query_all(QUERY, as: ChannelVideo) videos = db.query_all(QUERY, as: ChannelVideo)
.sort_by(&.published) .sort_by!(&.published)
.reverse! .reverse!
POPULAR_VIDEOS.set(videos) POPULAR_VIDEOS.set(videos)

Loading…
Cancel
Save