From 8b0ffd9a88fdbfa6dac5a8791b91e49df5c10775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Mon, 18 Jan 2016 21:41:12 +0100 Subject: [PATCH] don't bother iterating over disabled badges --- app/jobs/scheduled/badge_grant.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/scheduled/badge_grant.rb b/app/jobs/scheduled/badge_grant.rb index 5f218f91183..dc5def06840 100644 --- a/app/jobs/scheduled/badge_grant.rb +++ b/app/jobs/scheduled/badge_grant.rb @@ -10,7 +10,7 @@ module Jobs def execute(args) return unless SiteSetting.enable_badges - Badge.all.each do |b| + Badge.enabled.find_each do |b| begin BadgeGranter.backfill(b) rescue => ex