Application: Actually start finch if it's needed

This commit is contained in:
Lain Soykaf 2021-12-15 15:42:37 -05:00
parent abb62dd886
commit 4e98ba3c3a

View file

@ -61,7 +61,8 @@ def start(_type, _args) do
adapter = Application.get_env(:tesla, :adapter)
if adapter == Tesla.Adapter.Finch do
if match?({Tesla.Adapter.Finch, _}, adapter) do
Logger.info("Starting Finch")
Finch.start_link(name: MyFinch)
end