From 33935cafd8eaeb9ed3a7efcd9fbed26db9fe2c7d Mon Sep 17 00:00:00 2001 From: Sky Rose Date: Thu, 20 Jun 2024 15:14:41 -0400 Subject: [PATCH] Revert "DO NOT MERGE for testing sentry, /crash and crash on startup" This reverts commit 483d5ebdfeb2c5b29eaaa9abfe51be7fd7d56f45. --- lib/orbit/application.ex | 3 --- lib/orbit/crash_server.ex | 21 ------------------- lib/orbit_web/controllers/crash_controller.ex | 7 ------- lib/orbit_web/router.ex | 1 - 4 files changed, 32 deletions(-) delete mode 100644 lib/orbit/crash_server.ex delete mode 100644 lib/orbit_web/controllers/crash_controller.ex diff --git a/lib/orbit/application.ex b/lib/orbit/application.ex index d9f12ac..8c560c1 100644 --- a/lib/orbit/application.ex +++ b/lib/orbit/application.ex @@ -18,9 +18,6 @@ defmodule Orbit.Application do :ok = Logster.attach_phoenix_logger() - # unsupervised - Orbit.CrashServer.start_link([]) - Supervisor.start_link(children, strategy: :one_for_one, name: Orbit.Supervisor) end diff --git a/lib/orbit/crash_server.ex b/lib/orbit/crash_server.ex deleted file mode 100644 index f0d2834..0000000 --- a/lib/orbit/crash_server.ex +++ /dev/null @@ -1,21 +0,0 @@ -defmodule Orbit.CrashServer do - @moduledoc """ - Process that crashes, then stops, for testing Sentry - """ - use GenServer - - def start_link(_opts) do - GenServer.start_link(__MODULE__, nil) - end - - @impl true - def init(_args) do - Process.send_after(self(), :crash, 1000) - {:ok, nil} - end - - @impl true - def handle_info(:crash, _state) do - raise "Test Exception" - end -end diff --git a/lib/orbit_web/controllers/crash_controller.ex b/lib/orbit_web/controllers/crash_controller.ex deleted file mode 100644 index 9262ad8..0000000 --- a/lib/orbit_web/controllers/crash_controller.ex +++ /dev/null @@ -1,7 +0,0 @@ -defmodule OrbitWeb.CrashController do - use OrbitWeb, :controller - - def crash(_conn, _params) do - raise "Test Exception" - end -end diff --git a/lib/orbit_web/router.ex b/lib/orbit_web/router.ex index 3de976e..098a379 100644 --- a/lib/orbit_web/router.ex +++ b/lib/orbit_web/router.ex @@ -33,7 +33,6 @@ defmodule OrbitWeb.Router do # no pipe get "/_health", HealthController, :index get "/_health_db", HealthDbController, :index - get "/crash", CrashController, :crash end # Enable LiveDashboard in development