background as well since it's a computationally expensivemain
parent
f392030ab8
commit
cca82bf0a2
@ -0,0 +1,9 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class BlockWorker
|
||||||
|
include Sidekiq::Worker
|
||||||
|
|
||||||
|
def perform(account_id, target_account_id)
|
||||||
|
BlockService.new.call(Account.find(account_id), Account.find(target_account_id))
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class MergeWorker
|
||||||
|
include Sidekiq::Worker
|
||||||
|
|
||||||
|
def perform(from_account_id, into_account_id)
|
||||||
|
FeedManager.instance.merge_into_timeline(Account.find(from_account_id), Account.find(into_account_id))
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,9 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class UnmergeWorker
|
||||||
|
include Sidekiq::Worker
|
||||||
|
|
||||||
|
def perform(from_account_id, into_account_id)
|
||||||
|
FeedManager.instance.unmerge_from_timeline(Account.find(from_account_id), Account.find(into_account_id))
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue