From 153d25dd3acf6a2026ffd0b6e1315a709c01ee3e Mon Sep 17 00:00:00 2001 From: Justin Schneck Date: Thu, 26 Mar 2015 14:20:57 -0400 Subject: [PATCH 1/2] Added xmerl module to applications list --- mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index 809d08b..bdc4af8 100644 --- a/mix.exs +++ b/mix.exs @@ -10,7 +10,7 @@ defmodule Exrabbit.Mixfile do def application do [ mod: { Exrabbit, [] }, - applications: [:amqp_client, :jazz, :sweetconfig, :rabbit_common] + applications: [:amqp_client, :jazz, :sweetconfig, :rabbit_common, :xmerl] ] end From b4bfb90bb2660c5877d89799c26d98983d7dbdb3 Mon Sep 17 00:00:00 2001 From: Justin Schneck Date: Mon, 30 Mar 2015 12:57:02 -0400 Subject: [PATCH 2/2] Pass :ok, or :error back to caller. --- lib/exrabbit.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/exrabbit.ex b/lib/exrabbit.ex index 4ed1ae9..0564dc5 100644 --- a/lib/exrabbit.ex +++ b/lib/exrabbit.ex @@ -69,14 +69,14 @@ defmodule Exrabbit.Utils do end end) - {:ok, connection} = :amqp_connection.start(amqp_params_network( + params = amqp_params_network( username: connection_settings[:username], password: connection_settings[:password], host: connection_settings[:host], virtual_host: connection_settings[:virtual_host], heartbeat: connection_settings[:heartbeat] - )) - connection + ) + :amqp_connection.start(params) end defp get_payload(amqp_msg(payload: payload)), do: payload