Skip to content

Commit

Permalink
fix: k8s Status GenServer noproc (#564)
Browse files Browse the repository at this point in the history
* fix: k8s Status GenServer noproc

* Add warning log

* fix format
  • Loading branch information
jonas-martinez authored Jun 14, 2024
1 parent 72d8104 commit 1ee023d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion apps/lenra_web/lib/lenra_web/controllers/runner_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,16 @@ defmodule LenraWeb.RunnerController do
{:ok, _} <- Apps.update_build(build, %{status: status}),
{:ok, _} <- maybe_deploy_in_main_env(build, status) do
if String.downcase(Application.fetch_env!(:lenra, :pipeline_runner)) == "kubernetes" do
GenServer.stop({:global, {Kubernetes.Status, build_id}})
try do
GenServer.stop({:global, {Kubernetes.Status, build_id}})
catch
:exit, {:noproc, _} ->
Logger.warning(
"Could not stop Kubernetes.Status with build_id : `#{build_id}` because it was already stopped or has crashed."
)

:ok
end
end

reply(conn)
Expand Down

0 comments on commit 1ee023d

Please sign in to comment.