diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-11 15:11:52 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-11 15:11:52 +0200 |
commit | 1646bc57eae9880fd408d23ca692364dc6fd6442 (patch) | |
tree | 0f65d47498f33772152b20ee082d34e218f16df4 /shard/lib/app/pagestore.ex | |
parent | eb8c949551ffb8b3600357d7ff2bebe750af96e5 (diff) | |
download | shard-1646bc57eae9880fd408d23ca692364dc6fd6442.tar.gz shard-1646bc57eae9880fd408d23ca692364dc6fd6442.zip |
Move somme functionnality to SNet.Manager
Diffstat (limited to 'shard/lib/app/pagestore.ex')
-rw-r--r-- | shard/lib/app/pagestore.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shard/lib/app/pagestore.ex b/shard/lib/app/pagestore.ex index e09c513..ad18eac 100644 --- a/shard/lib/app/pagestore.ex +++ b/shard/lib/app/pagestore.ex @@ -107,7 +107,7 @@ defmodule SApp.PageStore do case prefer_ask do [_|_] -> for peer <- prefer_ask do - Shard.Manager.send_pid(peer, {state.shard_id, state.path, {:get, key}}) + SNet.Manager.send_pid(peer, {state.shard_id, state.path, {:get, key}}) end _ -> ask_random_peers(state, key) @@ -128,9 +128,9 @@ defmodule SApp.PageStore do {:get, key} -> case :dets.lookup state.store, key do [{_, _, bin}] -> - Shard.Manager.send_pid(conn_pid, {state.shard_id, state.path, {:info, key, bin}}) + SNet.Manager.send_pid(conn_pid, {state.shard_id, state.path, {:info, key, bin}}) _ -> - Shard.Manager.send_pid(conn_pid, {state.shard_id, state.path, {:not_found, key}}) + SNet.Manager.send_pid(conn_pid, {state.shard_id, state.path, {:not_found, key}}) end state {:info, hash, bin} -> @@ -251,7 +251,7 @@ defmodule SApp.PageStore do |> Enum.shuffle |> Enum.take(3) for peer <- peers do - Shard.Manager.send(peer, {state.shard_id, state.path, {:get, key}}) + SNet.Manager.send(peer, {state.shard_id, state.path, {:get, key}}) end end |