DEV: Fix chat notifier deprecation warnings from job arguments (#24708)
We're seeing some deprecation warnings in production. This is because we're passing a raw Ruby timestamp, which gets stringified implicitly when written to Redis. As per #15842, this conversion needs to be done explicitly.
This commit is contained in:
parent
de983796e1
commit
c7667f791e
|
@ -358,7 +358,7 @@ module Chat
|
|||
chat_message_id: @chat_message.id,
|
||||
to_notify_ids_map: to_notify.as_json,
|
||||
already_notified_user_ids: already_notified_user_ids,
|
||||
timestamp: @timestamp,
|
||||
timestamp: @timestamp.to_s,
|
||||
},
|
||||
)
|
||||
end
|
||||
|
@ -366,7 +366,7 @@ module Chat
|
|||
def notify_watching_users(except: [])
|
||||
Jobs.enqueue(
|
||||
Jobs::Chat::NotifyWatching,
|
||||
{ chat_message_id: @chat_message.id, except_user_ids: except, timestamp: @timestamp },
|
||||
{ chat_message_id: @chat_message.id, except_user_ids: except, timestamp: @timestamp.to_s },
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,7 +58,7 @@ describe Jobs::Chat::NotifyMentioned do
|
|||
.track_publish("/chat/notification-alert/#{user.id}") do
|
||||
job.execute(
|
||||
chat_message_id: message.id,
|
||||
timestamp: message.created_at,
|
||||
timestamp: message.created_at.to_s,
|
||||
to_notify_ids_map: to_notify_ids_map,
|
||||
already_notified_user_ids: already_notified_user_ids,
|
||||
)
|
||||
|
@ -69,7 +69,7 @@ describe Jobs::Chat::NotifyMentioned do
|
|||
def track_core_notification(user: user_2, message:, to_notify_ids_map:)
|
||||
job.execute(
|
||||
chat_message_id: message.id,
|
||||
timestamp: message.created_at,
|
||||
timestamp: message.created_at.to_s,
|
||||
to_notify_ids_map: to_notify_ids_map,
|
||||
)
|
||||
|
||||
|
@ -186,7 +186,7 @@ describe Jobs::Chat::NotifyMentioned do
|
|||
|
||||
job.execute(
|
||||
chat_message_id: message.id,
|
||||
timestamp: message.created_at,
|
||||
timestamp: message.created_at.to_s,
|
||||
to_notify_ids_map: to_notify_ids_map,
|
||||
)
|
||||
end
|
||||
|
@ -215,7 +215,7 @@ describe Jobs::Chat::NotifyMentioned do
|
|||
|
||||
job.execute(
|
||||
chat_message_id: message.id,
|
||||
timestamp: message.created_at,
|
||||
timestamp: message.created_at.to_s,
|
||||
to_notify_ids_map: to_notify_ids_map,
|
||||
)
|
||||
end
|
||||
|
@ -259,7 +259,7 @@ describe Jobs::Chat::NotifyMentioned do
|
|||
|
||||
job.execute(
|
||||
chat_message_id: message.id,
|
||||
timestamp: message.created_at,
|
||||
timestamp: message.created_at.to_s,
|
||||
to_notify_ids_map: to_notify_ids_map,
|
||||
)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue