Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.506 kb
-module({{appid}}).
-include("{{appid}}.hrl").
-include_lib("riak_core/include/riak_core_vnode.hrl").
-export([
ping/0
]).
%% Public API
%% @doc Pings a random vnode to make sure communication is functional
ping() ->
DocIdx = riak_core_util:chash_key({<<"ping">>, term_to_binary(now())}),
PrefList = riak_core_apl:get_primary_apl(DocIdx, 1, {{appid}}),
[{IndexNode, _Type}] = PrefList,
riak_core_vnode_master:sync_spawn_command(IndexNode, ping, {{appid}}_vnode_master).
Jump to Line
Something went wrong with that request. Please try again.