mirror of
https://github.com/TheRealOwenRees/plantid-discord-bot.git
synced 2026-07-23 12:36:58 +00:00
02372f2076
* 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
23 lines
625 B
Elixir
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
|