mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 10:56:15 +08:00
DEV: Use string timestamp when enqueuing update_top_redirection (#15826)
Job arguments go via JSON, and so DateTime objects 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:
parent
f53d70ac63
commit
5d82a695d0
|
@ -106,7 +106,7 @@ class UserOption < ActiveRecord::Base
|
|||
Discourse.redis.expire(key, delay)
|
||||
|
||||
# delay the update
|
||||
Jobs.enqueue_in(delay / 2, :update_top_redirection, user_id: self.user_id, redirected_at: Time.zone.now)
|
||||
Jobs.enqueue_in(delay / 2, :update_top_redirection, user_id: self.user_id, redirected_at: Time.zone.now.to_s)
|
||||
end
|
||||
|
||||
def should_be_redirected_to_top
|
||||
|
|
Loading…
Reference in New Issue
Block a user