diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-24 23:46:27 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-11-24 23:46:27 +0100 |
commit | 8efa081f210d72ed450c39ac4cde0fd84fb3d3fb (patch) | |
tree | 8be3c14b6b5e94d3d8ce7093bf7117bd7c87e346 /app/models/account.rb | |
parent | fca183968e4a868c8930ba3ac8fe22cef0c07f54 (diff) |
Remove Neo4J
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 16d654195..a60a23e14 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -130,15 +130,6 @@ class Account < ApplicationRecord username end - def common_followers_with(other_account) - results = Neography::Rest.new.execute_query('MATCH (a {account_id: {a_id}})-[:follows]->(b)-[:follows]->(c {account_id: {c_id}}) RETURN b.account_id', a_id: id, c_id: other_account.id) - ids = results['data'].map(&:first) - accounts = Account.where(id: ids).with_counters.limit(20).map { |a| [a.id, a] }.to_h - ids.map { |id| accounts[id] }.compact - rescue Neography::NeographyError, Excon::Error::Socket - [] - end - class << self def find_local!(username) find_remote!(username, nil) |