Skip to content

v0.3.0

Choose a tag to compare

@meadsteve meadsteve released this 24 Oct 14:49
· 56 commits to master since this release

Added helper logic for wrapping workers. Used as follows:

Replace a call to worker with a call to ChaosSpawn.Chaotic.ChaoticWorker.worker.
Any proceses of this child will then be automatically registered as a process that can be killed.

defmodule ChaosSpawn.Example.Supervisor do
  alias ChaosSpawn.Chaotic.ChaoticWorker

  def init(:ok) do
    children = [
      ChaoticWorker.worker(Some.Module, [:arg, :another_arg])
    ]

    supervise(children, strategy: :one_for_one)
  end

end