Remove unwanted code specific to MIX_ENV=test
This commit is contained in:
parent
88ce0e8b24
commit
1b82fd95d4
|
@ -9,17 +9,13 @@ defmodule Pleroma.Web.RelMe do
|
||||||
recv_timeout: 2_000
|
recv_timeout: 2_000
|
||||||
]
|
]
|
||||||
|
|
||||||
if Pleroma.Config.get(:env) == :test do
|
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
||||||
def parse(url) when is_binary(url), do: parse_url(url)
|
def parse(url) when is_binary(url) do
|
||||||
else
|
@cachex.fetch!(:rel_me_cache, url, fn _ ->
|
||||||
@cachex Pleroma.Config.get([:cachex, :provider], Cachex)
|
{:commit, parse_url(url)}
|
||||||
def parse(url) when is_binary(url) do
|
end)
|
||||||
@cachex.fetch!(:rel_me_cache, url, fn _ ->
|
rescue
|
||||||
{:commit, parse_url(url)}
|
e -> {:error, "Cachex error: #{inspect(e)}"}
|
||||||
end)
|
|
||||||
rescue
|
|
||||||
e -> {:error, "Cachex error: #{inspect(e)}"}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse(_), do: {:error, "No URL provided"}
|
def parse(_), do: {:error, "No URL provided"}
|
||||||
|
|
Loading…
Reference in New Issue