def callees(db, realm, procedure) do
Logger.info("Getting callees for #{inspect(procedure)} in realm #{inspect(realm)}")
- {_key, callees} = ClusterKV.get(db, realm, procedure, 500)
- {_key, [callee_index]} = ClusterKV.get(db, realm, "#{procedure}:callee_index")
- {callees, callee_index}
+ case ClusterKV.get(db, realm, procedure, 500) do
+ :not_found ->
+ :not_found
+
+ {_key, callees} ->
+ Logger.info("Got Callees: #{inspect(callees)}")
+ {_key, [callee_index]} = ClusterKV.get(db, realm, "#{procedure}:callee_index")
+ Logger.info("Got Index: #{callee_index}")
+ {callees, callee_index}
+ end
end
def round_robin(db, realm, procedure, len) do