From cca82bf0a2f0ccbf0feda00763fd7df0877845b6 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 23 Jan 2017 21:29:34 +0100 Subject: Move merging/unmerging of timelines into background. Move blocking into background as well since it's a computationally expensive --- app/workers/unmerge_worker.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 app/workers/unmerge_worker.rb (limited to 'app/workers/unmerge_worker.rb') diff --git a/app/workers/unmerge_worker.rb b/app/workers/unmerge_worker.rb new file mode 100644 index 000000000..dbf7243de --- /dev/null +++ b/app/workers/unmerge_worker.rb @@ -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 -- cgit