Skip to content

Commit

Permalink
Adhere to the review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mentels committed Jan 28, 2025
1 parent 1c892a3 commit 5e14488
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions lib/flame/pool.ex
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,18 @@ defmodule FLAME.Pool do
restart: :temporary
}

with {:start, {:ok, pid}} <- {:start, DynamicSupervisor.start_child(state.runner_sup, spec)},
{:remote_boot, :ok} <- {:remote_boot, Runner.remote_boot(pid, state.base_sync_stream)} do
{:ok, pid}
else
{:start, {:error, reason}} ->
{:error, {:start_error, reason}}
case DynamicSupervisor.start_child(state.runner_sup, spec) do
{:ok, pid} ->
case Runner.remote_boot(pid, state.base_sync_stream) do
:ok ->
{:ok, pid}

{:error, reason} ->
{:error, {:remote_boot_error, reason}}
end

{:remote_boot, {:error, reason}} ->
{:error, {:remote_boot_error, reason}}
{:error, reason} ->
{:error, {:start_error, reason}}
end
catch
:exit, reason ->
Expand Down

0 comments on commit 5e14488

Please sign in to comment.