From 44ff62aa123441c84056a697494c5379ffdde8e7 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Sat, 13 Jan 2024 22:01:33 +0100 Subject: [PATCH] PERF: Skip validations when hotlinked images are replaced in posts They are not necessary and slow down rebakes. --- app/jobs/regular/update_hotlinked_raw.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/jobs/regular/update_hotlinked_raw.rb b/app/jobs/regular/update_hotlinked_raw.rb index e2e99cc7f85..3763ab96a61 100644 --- a/app/jobs/regular/update_hotlinked_raw.rb +++ b/app/jobs/regular/update_hotlinked_raw.rb @@ -23,7 +23,13 @@ module Jobs if post.raw != raw 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