You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 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