FIX: Backwards compatibility for `SiteSetting.queue_jobs`

approved

#1

FIX: Backwards compatibility for SiteSetting.queue_jobs

Some plugin specs use this. Let’s deprecate it instead.

diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb
index 031fd5a..873dfe2 100644
--- a/app/models/site_setting.rb
+++ b/app/models/site_setting.rb
@@ -104,6 +104,11 @@ class SiteSetting < ActiveRecord::Base
     nil
   end
 
+  def self.queue_jobs=(val)
+    Discourse.deprecate("queue_jobs is deprecated. Please use Jobs.run_immediately! instead")
+    val ? Jobs.run_later! : Jobs.run_immediately!
+  end
+
   def self.email_polling_enabled?
     SiteSetting.manual_polling_enabled? || SiteSetting.pop3_polling_enabled?
   end

GitHub sha: 1b65469b


Approved #2