A platform for community discussion. Free, open, simple.
DEV: Update more Jobs#enqueue calls to use strings (#15823)
David Taylor863262a5debc
diff --git a/app/controllers/admin/email_controller.rb b/app/controllers/admin/email_controller.rbindex 3b9224f1b34..806bf4636db 100644--- a/app/controllers/admin/email_controller.rb+++ b/app/controllers/admin/email_controller.rb@@ -157,7 +157,7 @@ class Admin::EmailController < Admin::AdminControllerretry_count = 0begin- Jobs.enqueue(:process_email, mail: email_raw, retry_on_rate_limit: true, source: :handle_mail)+ Jobs.enqueue(:process_email, mail: email_raw, retry_on_rate_limit: true, source: "handle_mail")rescue JSON::GeneratorError, Encoding::UndefinedConversionError => eif retry_count == 0email_raw = email_raw.force_encoding('iso-8859-1').encode("UTF-8")diff --git a/app/services/notification_emailer.rb b/app/services/notification_emailer.rbindex a1e7f12efad..05e7a8b435a 100644--- a/app/services/notification_emailer.rb+++ b/app/services/notification_emailer.rb@@ -59,11 +59,11 @@ class NotificationEmailernotification_type = Notification.types[notification.notification_type]hash = {- type: type,+ type: type.to_s,user_id: notification.user_id,notification_id: notification.id,notification_data_hash: notification.data_hash,- notification_type: notification_type,+ notification_type: notification_type.to_s,}hash[:post_id] = post_id if post_id > 0 && notification_type != :post_approveddiff --git a/plugins/discourse-narrative-bot/plugin.rb b/plugins/discourse-narrative-bot/plugin.rbindex 2748dc9bc54..2eba865b377 100644--- a/plugins/discourse-narrative-bot/plugin.rb+++ b/plugins/discourse-narrative-bot/plugin.rb@@ -223,7 +223,7 @@ after_initialize doJobs.enqueue(:bot_input,user_id: user.id,post_id: post.id,- input: :reply+ input: "reply")endend@@ -233,7 +233,7 @@ after_initialize doJobs.enqueue(:bot_input,user_id: post.user.id,post_id: post.id,- input: :edit+ input: "edit")endend@@ -244,7 +244,7 @@ after_initialize douser_id: user.id,post_id: post.id,topic_id: post.topic_id,- input: :delete+ input: "delete")endend@@ -254,7 +254,7 @@ after_initialize doJobs.enqueue(:bot_input,user_id: user.id,post_id: post.id,- input: :recover+ input: "recover")endend@@ -264,11 +264,11 @@ after_initialize doinput =case self.post_action_type_idwhen *PostActionType.flag_types.values- self.post_action_type_id == PostActionType.types[:inappropriate] ? :flag : :reply+ self.post_action_type_id == PostActionType.types[:inappropriate] ? "flag" : "reply"when PostActionType.types[:like]- :like+ "like"when PostActionType.types[:bookmark]- :bookmark+ "bookmark"endif input@@ -283,7 +283,7 @@ after_initialize doself.add_model_callback(Bookmark, :after_commit, on: :create) doif self.post && self.user.enqueue_narrative_bot_job?- Jobs.enqueue(:bot_input, user_id: self.user_id, post_id: self.post_id, input: :bookmark)+ Jobs.enqueue(:bot_input, user_id: self.user_id, post_id: self.post_id, input: "bookmark")endend@@ -294,7 +294,7 @@ after_initialize doJobs.enqueue(:bot_input,user_id: user_id,topic_id: topic_id,- input: :topic_notification_level_changed+ input: "topic_notification_level_changed")endend