Set a long salts refresh interval on Mix.env == :test (#5510)

This commit is contained in:
Adam Rutkowski 2025-06-16 16:50:01 +02:00 committed by GitHub
parent 1aea8940d2
commit 1c182d6980
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -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)

View File

@ -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