Skip to content

Commit

Permalink
Fix: Backend config initializer to_existing_atom calls fixed (#87)
Browse files Browse the repository at this point in the history
* to_existing_atom converted to to_atom

* fix individual backend atom not in existence
  • Loading branch information
njwest committed Feb 23, 2024
1 parent af23726 commit f34a3a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/hammer/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule Hammer.Supervisor do
children =
Enum.map(config, fn {k, c} ->
"hammer_backend_#{k}_pool"
|> String.to_existing_atom()
|> String.to_atom()
|> to_pool_spec(c)
end)

Expand Down
2 changes: 1 addition & 1 deletion lib/hammer/utils.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Hammer.Utils do
end

def pool_name(name) do
String.to_existing_atom("hammer_backend_#{name}_pool")
String.to_atom("hammer_backend_#{name}_pool")
end

# Returns Erlang Time as milliseconds since 00:00 GMT, January 1, 1970
Expand Down

0 comments on commit f34a3a5

Please sign in to comment.