defmodule SupervisorTest do use Application require Logger def start(_type, _args) do import Supervisor.Spec, warn: false # ここは:one_for_oneだと,しかもStashが死ぬと,エラーになる opts = [strategy: :one_for_all, name: SupervisorTest.Supervisor] children = [ # Stashの中からworker supervisorを起動したいので、ここのchildrenの中にworker supervisorを入れない worker(SupervisorTest.Stash, []) ] {:ok, sup}=Supervisor.start_link(children, opts) Lo