Files
plantid-discord-bot/lib/application.ex
T
owenrees 02372f2076 Feat/error logs (#16)
* added list of tasks to achieve

* update deps

* update elixir version in CI/CD pipeline

* update todo with branch push checks

* underscores separation of large numbers

* update elixir version and deps

* add basic module  docs

* remove IO.inspect call

* check if list is empty rather than traversing list for length

* revert empty list code

* duration tests

* add mime type tests

* use logger instread of inspect, remove todos

* replace list length check with Enum.empty

* replace list length check with !Enum.empty?

* numbers readability fix by using underscores on large numbers

* iucn parser replaced case with multiclause function and added test

* replace map and join with map_join

* fix multiple spec issues where map() must be inside a list
2025-12-06 23:41:59 +01:00

23 lines
625 B
Elixir

defmodule PlantIdDiscordBot.Application do
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
PlantIdDiscordBot.ProcessRegistry,
PlantIdDiscordBot.Consumer,
PlantIdDiscordBot.RateLimiter,
{PlantIdDiscordBot.Metrics.Requests, []},
PlantIdDiscordBot.Scheduler,
{Plug.Cowboy,
scheme: :http,
plug: PlantIdDiscordBot.FileServer,
options: [port: Application.get_env(:plantid_discord_bot, :port)]}
]
opts = [strategy: :one_for_one, name: PlantIdDiscordBot.Supervisor]
Supervisor.start_link(children, opts)
end
end