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.

15 lines
350 B

  1. # frozen_string_literal: true
  2. class ThreadResolveWorker
  3. include Sidekiq::Worker
  4. def perform(child_status_id, parent_url)
  5. child_status = Status.find(child_status_id)
  6. parent_status = FetchRemoteStatusService.new.call(parent_url)
  7. return if parent_status.nil?
  8. child_status.thread = parent_status
  9. child_status.save!
  10. end
  11. end