From 668013265c3153383088d9dd53970ae837c1d405 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 12 Dec 2016 21:12:19 +0100 Subject: Restoring old async behaviour of thread resolving as it proved to be more robust --- app/services/process_feed_service.rb | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'app/services/process_feed_service.rb') diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb index a525bc321..3860a3504 100644 --- a/app/services/process_feed_service.rb +++ b/app/services/process_feed_service.rb @@ -122,7 +122,7 @@ class ProcessFeedService < BaseService def find_or_resolve_status(parent, uri, url) status = find_status(uri) - ResolveThread.new.call(parent, url) if status.nil? + ThreadResolveWorker.perform_async(parent.id, url) if status.nil? status end @@ -243,15 +243,4 @@ 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 -- cgit