PERF: Skip validations when hotlinked images are replaced in posts

They are not necessary and slow down rebakes.
This commit is contained in:
Gerhard Schlager 2024-01-13 22:01:33 +01:00 committed by Gerhard Schlager
parent 241bf48497
commit 44ff62aa12

View File

@ -23,7 +23,13 @@ module Jobs
if post.raw != raw if post.raw != raw
changes = { raw: raw, edit_reason: I18n.t("upload.edit_reason") } changes = { raw: raw, edit_reason: I18n.t("upload.edit_reason") }
post.revise(Discourse.system_user, changes, bypass_bump: true, skip_staff_log: true) post.revise(
Discourse.system_user,
changes,
bypass_bump: true,
skip_staff_log: true,
skip_validations: true,
)
end end
end end
end end