Reactor.Process.Step.TerminateChild (reactor_process v0.4.2)
View SourceTerminates the given child identified by child_id.
See the documentation for Supervisor.terminate_child/2 for more information.
Restarting
When the reactor is undoing changes, it is possible for this step to restart
the terminated child using restart_child/2. Be aware that this will only
work if the child spec hasn't subsequently been deleted by another step and
the restart_child/2 function is present on the module (ie not
DynamicSupervisor).
Child ID
The child_id argument can take either a traditional child ID (for a
traditional Supervisor) or a PID (for a DynamicSupervisor). It's up to
you to make sure you provide the correct inputs.
Arguments
:supervisor- Required. The supervisor to query:child_id(term/0) - Required. The PID or ID of the child to remove
Options
:module(module/0) - The module to use. Must exportcount_children/1The default value isSupervisor.:fail_on_not_found?(boolean/0) - Whether the step should fail if the no child is found under thechild_idThe default value istrue.:restart_on_undo?(boolean/0) - Whether to terminate the started process when the Reactor is undoing changes The default value istrue.