diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-02 18:11:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-02 18:11:13 +0200 |
commit | 70ddef2654a931827ce5e4323e3042365f6078f2 (patch) | |
tree | 05ed40d6d1b218a5131199c88d0c9cd1fa0091a0 /app/workers | |
parent | ac6935b629f5e9cd07cca468a6f3588a6e585e25 (diff) |
Change trending hashtags to not disappear instantly after midnight (#11712)
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/scheduler/trending_tags_scheduler.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/workers/scheduler/trending_tags_scheduler.rb b/app/workers/scheduler/trending_tags_scheduler.rb new file mode 100644 index 000000000..77f0d5747 --- /dev/null +++ b/app/workers/scheduler/trending_tags_scheduler.rb @@ -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 |