Update push_update_worker.rb redis
This commit is contained in:
parent
da98d61c2c
commit
29cfe511d1
|
@ -9,7 +9,9 @@ class PushUpdateWorker
|
|||
message = InlineRenderer.render(status, account, :status)
|
||||
timeline_id = "timeline:#{account.id}" if timeline_id.nil?
|
||||
|
||||
Redis.current.publish(timeline_id, Oj.dump(event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i))
|
||||
Redis.current.with do |conn|
|
||||
conn.publish(timeline_id, Oj.dump(event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i))
|
||||
end
|
||||
true
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
|
|
Loading…
Reference in New Issue