Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090)
This commit is contained in:
@ -6,7 +6,7 @@ class PushUpdateWorker
|
||||
def perform(account_id, status_id)
|
||||
account = Account.find(account_id)
|
||||
status = Status.find(status_id)
|
||||
message = InlineRenderer.render(status, account, 'api/v1/statuses/show')
|
||||
message = InlineRenderer.render(status, account, :status)
|
||||
|
||||
Redis.current.publish("timeline:#{account.id}", Oj.dump(event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
Reference in New Issue
Block a user