From f34a3a5ab2c3a49a66cb5b3fac6c0ff84100bc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nick=20West=20=E9=9F=8B=E7=BE=B2?= Date: Fri, 23 Feb 2024 11:18:44 -0500 Subject: [PATCH] Fix: Backend config initializer to_existing_atom calls fixed (#87) * to_existing_atom converted to to_atom * fix individual backend atom not in existence --- lib/hammer/supervisor.ex | 2 +- lib/hammer/utils.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hammer/supervisor.ex b/lib/hammer/supervisor.ex index 60b88e3..3b37fc9 100644 --- a/lib/hammer/supervisor.ex +++ b/lib/hammer/supervisor.ex @@ -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) diff --git a/lib/hammer/utils.ex b/lib/hammer/utils.ex index c4a7749..f226cb0 100644 --- a/lib/hammer/utils.ex +++ b/lib/hammer/utils.ex @@ -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