The code powering m.abunchtell.com https://m.abunchtell.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
382 B

  1. # frozen_string_literal: true
  2. class FeedInsertWorker
  3. include Sidekiq::Worker
  4. def perform(status_id, follower_id)
  5. status = Status.find(status_id)
  6. follower = Account.find(follower_id)
  7. return if FeedManager.instance.filter?(:home, status, follower.id)
  8. FeedManager.instance.push(:home, follower, status)
  9. rescue ActiveRecord::RecordNotFound
  10. true
  11. end
  12. end