Switch to #sort_by! in pull_popular_videos job

This commit is contained in:
syeopite 2021-09-26 15:04:33 -07:00
parent 17e481c107
commit e2bbc9a6fa
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82

View File

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