about summary refs log tree commit diff
path: root/app/workers/push_update_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/push_update_worker.rb')
-rw-r--r--app/workers/push_update_worker.rb13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/workers/push_update_worker.rb b/app/workers/push_update_worker.rb
index 166a9b449..fbcdcf634 100644
--- a/app/workers/push_update_worker.rb
+++ b/app/workers/push_update_worker.rb
@@ -3,19 +3,12 @@
 class PushUpdateWorker
   include Sidekiq::Worker
 
-  def perform(timeline, account_id, status_id)
+  def perform(account_id, status_id)
     account = Account.find(account_id)
     status  = Status.find(status_id)
-    
-    message = Rabl::Renderer.new(
-      'api/v1/statuses/show', 
-      status, 
-      view_path: 'app/views', 
-      format: :json, 
-      scope: InlineRablScope.new(account)
-    )
+    message = InlineRenderer.render(status, account, 'api/v1/statuses/show')
 
-    Redis.current.publish("timeline:#{account.id}", Oj.dump({ event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i }))
+    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
     true
   end