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.

17 lines
382 B

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