DEV: Update more Jobs#enqueue calls to use strings (#15823)

Symbols are converted to strings anyway, so there is no change in behaviour. The latest version of sidekiq introduced a warning for this.
This commit is contained in:
David Taylor
2022-02-04 19:58:34 +00:00
committed by GitHub
parent be8c0baa18
commit 863262a5de
3 changed files with 12 additions and 12 deletions

View File

@ -223,7 +223,7 @@ after_initialize do
Jobs.enqueue(:bot_input,
user_id: user.id,
post_id: post.id,
input: :reply
input: "reply"
)
end
end
@ -233,7 +233,7 @@ after_initialize do
Jobs.enqueue(:bot_input,
user_id: post.user.id,
post_id: post.id,
input: :edit
input: "edit"
)
end
end
@ -244,7 +244,7 @@ after_initialize do
user_id: user.id,
post_id: post.id,
topic_id: post.topic_id,
input: :delete
input: "delete"
)
end
end
@ -254,7 +254,7 @@ after_initialize do
Jobs.enqueue(:bot_input,
user_id: user.id,
post_id: post.id,
input: :recover
input: "recover"
)
end
end
@ -264,11 +264,11 @@ after_initialize do
input =
case self.post_action_type_id
when *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"
end
if input
@ -283,7 +283,7 @@ after_initialize do
self.add_model_callback(Bookmark, :after_commit, on: :create) do
if 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")
end
end
@ -294,7 +294,7 @@ after_initialize do
Jobs.enqueue(:bot_input,
user_id: user_id,
topic_id: topic_id,
input: :topic_notification_level_changed
input: "topic_notification_level_changed"
)
end
end