mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
FIX: do not execute onceoff badge queries if the badges are disabled
This commit is contained in:
parent
aa16f043ea
commit
a80e8cb9bd
3 changed files with 3 additions and 0 deletions
|
@ -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 a new issue