The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

18 lignes
397 B

  1. # frozen_string_literal: true
  2. class ThreadResolveWorker
  3. include Sidekiq::Worker
  4. sidekiq_options queue: 'pull', 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