about summary refs log tree commit diff
path: root/app/services
diff options
context:
space:
mode:
authorShunsuke Michii <harukasan@me.com>2017-05-16 19:12:29 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-16 12:12:29 +0200
commit0dfffb6dcb48f881a39c17841ce8f02087d219d6 (patch)
tree0fce3d186a4dff043469a944fca085e55e54fb1b /app/services
parent1b0a5658f15eeca0934a892d95dd93222d8da583 (diff)
Make faster ProcessFeedService (#3080)
* Add index accounts on uri.

* Remove a blank line.
Diffstat (limited to 'app/services')
-rw-r--r--app/services/process_feed_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/process_feed_service.rb b/app/services/process_feed_service.rb
index afd44aafe..c573c0490 100644
--- a/app/services/process_feed_service.rb
+++ b/app/services/process_feed_service.rb
@@ -209,7 +209,7 @@ class ProcessFeedService < BaseService
       if TagManager.instance.web_domain?(url.host)
         Account.find_local(url.path.gsub('/users/', ''))
       else
-        Account.find_by(uri: href) || Account.find_by(url: href) || FetchRemoteAccountService.new.call(href)
+        Account.where(uri: href).or(Account.where(url: href)).first || FetchRemoteAccountService.new.call(href)
       end
     end