Set a long salts refresh interval on Mix.env == :test (#5510)
This commit is contained in:
parent
1aea8940d2
commit
1c182d6980
|
|
@ -48,3 +48,5 @@ config :plausible, Plausible.HelpScout,
|
||||||
req_opts: [
|
req_opts: [
|
||||||
plug: {Req.Test, Plausible.HelpScout}
|
plug: {Req.Test, Plausible.HelpScout}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
config :plausible, Plausible.Session.Salts, interval: :timer.hours(1)
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,8 @@ defmodule Plausible.Session.Salts do
|
||||||
end
|
end
|
||||||
|
|
||||||
true = :ets.insert(name, {:state, state})
|
true = :ets.insert(name, {:state, state})
|
||||||
Process.send_after(self(), {:refresh, now}, :timer.seconds(90))
|
interval = Application.get_env(:plausible, __MODULE__)[:interval] || :timer.seconds(90)
|
||||||
|
Process.send_after(self(), {:refresh, now}, interval)
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue