FIX: do not execute onceoff badge queries if the badges are disabled
This commit is contained in:
parent
aa16f043ea
commit
a80e8cb9bd
|
@ -2,6 +2,7 @@ module Jobs
|
|||
|
||||
class GrantFirstReplyByEmail < Jobs::Onceoff
|
||||
def execute_onceoff(args)
|
||||
return unless SiteSetting.enable_badges
|
||||
to_award = {}
|
||||
|
||||
Post.select(:id, :created_at, :user_id)
|
||||
|
|
|
@ -2,6 +2,7 @@ module Jobs
|
|||
|
||||
class GrantEmoji < Jobs::Onceoff
|
||||
def execute_onceoff(args)
|
||||
return unless SiteSetting.enable_badges
|
||||
to_award = {}
|
||||
|
||||
Post.secured(Guardian.new)
|
||||
|
|
|
@ -4,6 +4,7 @@ module Jobs
|
|||
sidekiq_options queue: 'low'
|
||||
|
||||
def execute_onceoff(args)
|
||||
return unless SiteSetting.enable_badges
|
||||
to_award = {}
|
||||
|
||||
Post.secured(Guardian.new)
|
||||
|
|
Loading…
Reference in New Issue