- Replace Timex with regex-based timestamp parser (broader format support) - Replace Earmark with local Markdown.to_html! (headings, code blocks, tables, lists, inline formatting, links, horizontal rules) - Remove dns_cluster (unused, single-instance deployment) - Add stream_data property tests for timestamp parsing (5 properties covering ISO, US dates, AM/PM, format roundtrips, garbage rejection) - Removes transitive deps: combine, tzdata, hackney, certifi, metrics, mimerl, parse_trans, ssl_verify_fun
46 lines
1.3 KiB
Elixir
46 lines
1.3 KiB
Elixir
defmodule Microwaveprop.Application do
|
|
# See https://hexdocs.pm/elixir/Application.html
|
|
# for more information on OTP Applications
|
|
@moduledoc false
|
|
|
|
use Application
|
|
|
|
@impl true
|
|
def start(_type, _args) do
|
|
migrate()
|
|
|
|
children = [
|
|
MicrowavepropWeb.Telemetry,
|
|
Microwaveprop.Repo,
|
|
{Phoenix.PubSub, name: Microwaveprop.PubSub},
|
|
{Oban, Application.fetch_env!(:microwaveprop, Oban)},
|
|
# Start to serve requests, typically the last entry
|
|
MicrowavepropWeb.Endpoint,
|
|
Microwaveprop.Propagation.FreshnessMonitor
|
|
]
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html
|
|
# for other strategies and supported options
|
|
opts = [strategy: :one_for_one, name: Microwaveprop.Supervisor]
|
|
result = Supervisor.start_link(children, opts)
|
|
|
|
# Load ML model in dev/test only (Nx/Axon not compiled for prod)
|
|
if Application.get_env(:microwaveprop, :load_ml_model, false) do
|
|
Microwaveprop.Propagation.load_ml_model()
|
|
end
|
|
|
|
result
|
|
end
|
|
|
|
# Tell Phoenix to update the endpoint configuration
|
|
# whenever the application is updated.
|
|
defp migrate do
|
|
Microwaveprop.Release.migrate()
|
|
end
|
|
|
|
@impl true
|
|
def config_change(changed, _new, removed) do
|
|
MicrowavepropWeb.Endpoint.config_change(changed, removed)
|
|
:ok
|
|
end
|
|
end
|