]> cat aescling's git repositories - mastodon.git/blob - app/workers/thread_resolve_worker.rb
Merge pull request #3 from tootsuite/master
[mastodon.git] / app / workers / thread_resolve_worker.rb
1 # frozen_string_literal: true
2
3 class ThreadResolveWorker
4 include Sidekiq::Worker
5
6 sidekiq_options retry: false
7
8 def perform(child_status_id, parent_url)
9 child_status = Status.find(child_status_id)
10 parent_status = FetchRemoteStatusService.new.call(parent_url)
11
12 return if parent_status.nil?
13
14 child_status.thread = parent_status
15 child_status.save!
16 end
17 end
This page took 0.068651 seconds and 4 git commands to generate.