From bf4a55a1186400ee9b927502de671d6c551aa774 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 18 Jul 2023 11:08:41 +0200 Subject: [PATCH] Start Phoenix endpoint last --- lib/asciinema/application.ex | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/asciinema/application.ex b/lib/asciinema/application.ex index 9a2e53ecf..ad5b58ed4 100644 --- a/lib/asciinema/application.ex +++ b/lib/asciinema/application.ex @@ -24,17 +24,18 @@ defmodule Asciinema.Application do Asciinema.Telemetry, # Start the Ecto repository Asciinema.Repo, - # Start rate limiter - {PlugAttack.Storage.Ets, name: AsciinemaWeb.PlugAttack.Storage, clean_period: 60_000}, - # Start the endpoint when the application starts - AsciinemaWeb.Endpoint, # Start PNG generator poolboy pool :poolboy.child_spec(:worker, Asciinema.PngGenerator.Rsvg.poolboy_config(), []), # Start Oban {Oban, oban_config()}, + # Start distributed registry {Horde.Registry, [name: Asciinema.Streaming.LiveStreamRegistry, keys: :unique, members: :auto]}, - Asciinema.Streaming.LiveStreamSupervisor + Asciinema.Streaming.LiveStreamSupervisor, + # Start rate limiter + {PlugAttack.Storage.Ets, name: AsciinemaWeb.PlugAttack.Storage, clean_period: 60_000}, + # Start the endpoint when the application starts + AsciinemaWeb.Endpoint ] # See https://hexdocs.pm/elixir/Supervisor.html