gab-social/app/workers/authorize_follow_worker.rb

15 lines
370 B
Ruby
Raw Normal View History

2019-07-02 08:10:25 +01:00
# frozen_string_literal: true
class AuthorizeFollowWorker
include Sidekiq::Worker
def perform(source_account_id, target_account_id)
source_account = Account.find(source_account_id)
target_account = Account.find(target_account_id)
AuthorizeFollowService.new.call(source_account, target_account)
rescue ActiveRecord::RecordNotFound
true
end
end