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.
16 lines
382 B
16 lines
382 B
8 years ago
|
# frozen_string_literal: true
|
||
|
|
||
|
class FeedInsertWorker
|
||
|
include Sidekiq::Worker
|
||
|
|
||
|
def perform(status_id, follower_id)
|
||
|
status = Status.find(status_id)
|
||
|
follower = Account.find(follower_id)
|
||
|
|
||
|
return if FeedManager.instance.filter?(:home, status, follower.id)
|
||
|
FeedManager.instance.push(:home, follower, status)
|
||
|
rescue ActiveRecord::RecordNotFound
|
||
|
true
|
||
|
end
|
||
|
end
|