mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use strings for :user_email job type argument
Job arguments go via JSON, and so symbols will appear as strings in the Job's `#execute` method. The latest version of Sidekiq has started warning about this to reduce developer confusion.
This commit is contained in:
@@ -24,7 +24,7 @@ class EmailUpdater
|
||||
|
||||
if existing_user = User.find_by_email(email)
|
||||
if SiteSetting.hide_email_address_taken
|
||||
Jobs.enqueue(:critical_user_email, type: :account_exists, user_id: existing_user.id)
|
||||
Jobs.enqueue(:critical_user_email, type: "account_exists", user_id: existing_user.id)
|
||||
else
|
||||
error_message = +'change_email.error'
|
||||
error_message << '_staged' if existing_user.staged?
|
||||
|
||||
@@ -28,7 +28,7 @@ task "admin:invite", [:email] => [:environment] do |_, args|
|
||||
|
||||
puts "Sending email!"
|
||||
email_token = user.email_tokens.create!(email: user.email, scope: EmailToken.scopes[:password_reset])
|
||||
Jobs.enqueue(:user_email, type: :account_created, user_id: user.id, email_token: email_token.token)
|
||||
Jobs.enqueue(:user_email, type: "account_created", user_id: user.id, email_token: email_token.token)
|
||||
end
|
||||
|
||||
desc "Creates a forum administrator"
|
||||
|
||||
Reference in New Issue
Block a user