mirror of
https://github.com/plausible/analytics.git
synced 2024-11-23 11:12:15 +03:00
Configure ref_inspector and ua_inspector at runtime
This commit is contained in:
parent
8d36d27ca3
commit
25cd4301c3
@ -165,4 +165,10 @@ config :plausible, Oban,
|
||||
queues: if(cron_enabled, do: queues, else: []),
|
||||
crontab: if(cron_enabled, do: crontab, else: false)
|
||||
|
||||
config :ref_inspector,
|
||||
init: {Plausible.Release, :configure_ref_inspector}
|
||||
|
||||
config :ua_inspector,
|
||||
init: {Plausible.Release, :configure_ua_inspector}
|
||||
|
||||
config :logger, level: :warn
|
||||
|
@ -68,6 +68,16 @@ defmodule Plausible.Release do
|
||||
end
|
||||
end
|
||||
|
||||
def configure_ref_inspector() do
|
||||
priv_dir = Application.app_dir(:plausible, "priv/ref_inspector")
|
||||
Application.put_env(:ref_inspector, :database_path, priv_dir)
|
||||
end
|
||||
|
||||
def configure_ua_inspector() do
|
||||
priv_dir = Application.app_dir(:plausible, "priv/ua_inspector")
|
||||
Application.put_env(:ua_inspector, :database_path, priv_dir)
|
||||
end
|
||||
|
||||
##############################
|
||||
|
||||
defp validate_admin({nil, nil, nil}) do
|
||||
|
Loading…
Reference in New Issue
Block a user