Elixir 1.5 introduced streamlined child specs, which allow the child specifications to be defined in modules. Instead of relying on the worker and supervisor functions from the Supervisor.Spec module, supervisors now receive a list of modules as children, and will call the child_spec/1 function on each child module. This allows the child module to control how they are run under a supervisor.
Let's see the modules presented in the previous example now using streamlined child specs. In the supervisor, we only changed the init/1 function to the following:
$ cat examples/upload_pipeline_supervisor_with_streamlined_child_specs.exdefmodule ElixirDrip.Storage.Supervisors.Upload.Pipeline do # ... def init(:ok) do Logger.debug("#{inspect(self())} ...