about summary refs log tree commit diff
path: root/app/workers/thread_resolve_worker.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/workers/thread_resolve_worker.rb')
-rw-r--r--app/workers/thread_resolve_worker.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/workers/thread_resolve_worker.rb b/app/workers/thread_resolve_worker.rb
new file mode 100644
index 000000000..ccc56380b
--- /dev/null
+++ b/app/workers/thread_resolve_worker.rb
@@ -0,0 +1,13 @@
+class ThreadResolveWorker
+  include Sidekiq::Worker
+
+  def perform(child_status_id, parent_url)
+    child_status  = Status.find(child_status_id)
+    parent_status = FetchRemoteStatusService.new.(parent_url)
+
+    unless parent_status.nil?
+      child_status.thread = parent_status
+      child_status.save!
+    end
+  end
+end