Application: Actually start finch if it's needed
This commit is contained in:
parent
abb62dd886
commit
4e98ba3c3a
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue