Change trending hashtags to not disappear instantly after midnight (#11712)

This commit is contained in:
Eugen Rochko 2019-09-02 18:11:13 +02:00 committed by GitHub
parent ac6935b629
commit 70ddef2654
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 179 additions and 37 deletions

View file

@ -0,0 +1,11 @@
# frozen_string_literal: true
class Scheduler::TrendingTagsScheduler
include Sidekiq::Worker
sidekiq_options unique: :until_executed, retry: 0
def perform
TrendingTags.update! if Setting.trends
end
end