Created
January 4, 2017 16:00
-
-
Save gpad/86d6e6d02058002437bbb856c7c6bfe3 to your computer and use it in GitHub Desktop.
NoSlides Service First Version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule NoSlides.Service do | |
| def ping(v\\1) do | |
| idx = :riak_core_util.chash_key({"noslides", "ping#{v}"}) | |
| pref_list = :riak_core_apl.get_primary_apl(idx, 1, NoSlides.Service) | |
| [{index_node, _type}] = pref_list | |
| :riak_core_vnode_master.sync_command(index_node, {:ping, v}, NoSlides.VNode_master) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment