DEV: disable missing post uploads check by default.

DEV: disable missing post uploads check by default.

diff --git a/app/jobs/scheduled/ensure_post_uploads_existence.rb b/app/jobs/scheduled/ensure_post_uploads_existence.rb
index cc3434a..e1bde48 100644
--- a/app/jobs/scheduled/ensure_post_uploads_existence.rb
+++ b/app/jobs/scheduled/ensure_post_uploads_existence.rb
@@ -8,6 +8,8 @@ module Jobs
     MISSING_UPLOADS ||= "missing_uploads"
 
     def execute(args)
+      return unless SiteSetting.enable_missing_post_uploads_check
+
       PostCustomField
         .where(name: MISSING_UPLOADS)
         .where("created_at < ?", 1.month.ago)
diff --git a/config/site_settings.yml b/config/site_settings.yml
index cfe6844..3123aa9 100644
--- a/config/site_settings.yml
+++ b/config/site_settings.yml
@@ -1483,6 +1483,9 @@ developer:
   enable_safe_mode:
     default: true
     client: true
+  enable_missing_post_uploads_check:
+    default: false
+    hidden: true
 
 embedding:
   feed_polling_enabled:

GitHub sha: 2c7a5086

BTW this broke the build and I had to follow up with this: FIX: Make sure the site setting works and fix build · discourse/discourse@c9ddc6c · GitHub

It’s also always a good idea to add a test when you add a new setting.

3 Likes

I agree. Thanks for the fix.