diff options
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/process_feed_service.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index 1a831fa73..a525bc321 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -121,7 +121,8 @@ class ProcessFeedService < BaseService def find_or_resolve_status(parent, uri, url) status = find_status(uri) - ThreadResolveWorker.perform_async(parent.id, url) if status.nil? + + ResolveThread.new.call(parent, url) if status.nil? status end @@ -242,4 +243,15 @@ class ProcessFeedService < BaseService "#{username}@#{domain}" end end + + class ResolveThread + def call(child_status, parent_url) + parent_status = FetchRemoteStatusService.new.call(parent_url) + + return if parent_status.nil? + + child_status.thread = parent_status + child_status.save! + end + end end |