merge_worker.rb 370 B

1234567891011121314
  1. # frozen_string_literal: true
  2. class MergeWorker
  3. include Sidekiq::Worker
  4. include Redisable
  5. def perform(from_account_id, into_account_id)
  6. FeedManager.instance.merge_into_home(Account.find(from_account_id), Account.find(into_account_id))
  7. rescue ActiveRecord::RecordNotFound
  8. true
  9. ensure
  10. redis.del("account:#{into_account_id}:regeneration")
  11. end
  12. end