Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
pertsevds committed Mar 29, 2024
1 parent 9982548 commit d2573ee
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/dns_srv_cluster/app.ex
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ defmodule DNSSRVCluster.App do
child_spec =
[
{DNSSRVCluster.Worker,
query: query, interval: interval(), connect_timeout: connect_timeout(), resolver: resolver()}
query: query,
interval: interval(),
connect_timeout: connect_timeout(),
resolver: resolver()}
]

opts = [strategy: :one_for_one, name: DNSSRVCluster.Supervisor]
Expand Down
4 changes: 3 additions & 1 deletion lib/dns_srv_cluster/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ defmodule DNSSRVCluster.Worker do
Logger.warning("Connect to \"#{node_name}\" failed.")

{:ok, {node_name, :ignored}} ->
Logger.warning("Connect request to \"#{node_name}\" ignored. Looks like Erlang distribution is not enabled.")
Logger.warning(
"Connect request to \"#{node_name}\" ignored. Looks like Erlang distribution is not enabled."
)

:error ->
Logger.error("connect_nodes/3 Task async error.")
Expand Down
3 changes: 2 additions & 1 deletion test/dns_srv_cluster_worker_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ defmodule DNSSRVClusterWorkerTest do

test "We can use DNSSRVCluster.Worker without application" do
children = [
{DNSSRVCluster.Worker, query: "_app._tcp.yourdomain.com", resolver: DNSSRVClusterAppTest.Resolver}
{DNSSRVCluster.Worker,
query: "_app._tcp.yourdomain.com", resolver: DNSSRVClusterAppTest.Resolver}
]

res = Supervisor.start_link(children, strategy: :one_for_one)
Expand Down

0 comments on commit d2573ee

Please sign in to comment.