Skip to content

Commit

Permalink
feat(elixir): add restart_type option for workers
Browse files Browse the repository at this point in the history
  • Loading branch information
calebbourg authored and hairyhum committed Feb 18, 2022
1 parent 6d753cb commit faf43e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion implementations/elixir/ockam/ockam/lib/ockam/node.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ defmodule Ockam.Node do

@doc false
def start_supervised(module, options) do
restart_type = Keyword.get(options, :restart_type, :transient)

DynamicSupervisor.start_child(
@processes_supervisor,
Supervisor.child_spec({module, options}, restart: :transient)
Supervisor.child_spec({module, options}, restart: restart_type)
)
end

Expand Down

0 comments on commit faf43e0

Please sign in to comment.