Standardize the way we capture and use Mix.env()

This commit is contained in:
Mark Felder 2021-02-04 10:11:48 -06:00
commit bf9cd4a0e2
3 changed files with 11 additions and 7 deletions

View file

@ -5,6 +5,8 @@
defmodule Pleroma.Uploaders.Uploader do
import Pleroma.Web.Gettext
@mix_env Mix.env()
@moduledoc """
Defines the contract to put and get an uploaded file to any backend.
"""
@ -74,7 +76,7 @@ defmodule Pleroma.Uploaders.Uploader do
end
defp callback_timeout do
case Mix.env() do
case @mix_env do
:test -> 1_000
_ -> 30_000
end