FIX: posts would not auto rebake unless gravatar download was enabled
This commit is contained in:
parent
031c252cd3
commit
8e307e633e
|
@ -28,7 +28,7 @@ module Jobs
|
||||||
TopicTimer.ensure_consistency!
|
TopicTimer.ensure_consistency!
|
||||||
|
|
||||||
# Forces rebake of old posts where needed, as long as no system avatars need updating
|
# Forces rebake of old posts where needed, as long as no system avatars need updating
|
||||||
unless UserAvatar.where("last_gravatar_download_attempt IS NULL").limit(1).first
|
if !SiteSetting.automatically_download_gravatars || !UserAvatar.where("last_gravatar_download_attempt IS NULL").limit(1).first
|
||||||
problems = Post.rebake_old(SiteSetting.rebake_old_posts_count)
|
problems = Post.rebake_old(SiteSetting.rebake_old_posts_count)
|
||||||
problems.each do |hash|
|
problems.each do |hash|
|
||||||
post_id = hash[:post].id
|
post_id = hash[:post].id
|
||||||
|
|
Loading…
Reference in New Issue