The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

18 rader
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