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
1 changed files with 2 additions and 1 deletions

View File

@ -61,7 +61,8 @@ def start(_type, _args) do
adapter = Application.get_env(:tesla, :adapter) 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) Finch.start_link(name: MyFinch)
end end