don't bother iterating over disabled badges

This commit is contained in:
Régis Hanol 2016-01-18 21:41:12 +01:00
parent bfa4e6b69c
commit 8b0ffd9a88
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ module Jobs
def execute(args) def execute(args)
return unless SiteSetting.enable_badges return unless SiteSetting.enable_badges
Badge.all.each do |b| Badge.enabled.find_each do |b|
begin begin
BadgeGranter.backfill(b) BadgeGranter.backfill(b)
rescue => ex rescue => ex