Erlang : Connecting to Redis DB

load_data({Dst, Msg}) ->
        %io:fwrite("DST : ~p~n", [binary_to_list(Dst)]),
        %io:fwrite("MSG : ~p~n~n", [binary_to_list(Msg)]),
        {ok, Client} = erldis:connect("localhost", 6379),
        erldis:hset(Client, <<"sqlite1">>, Dst, Msg).

erldis-0.2.1 used

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: