application.ex 617 B

12345678910111213141516171819202122
  1. defmodule Partizan.Application do
  2. # See https://hexdocs.pm/elixir/Application.html
  3. # for more information on OTP Applications
  4. @moduledoc false
  5. use Application
  6. def start(_type, _args) do
  7. import Supervisor.Spec
  8. # List all child processes to be supervised
  9. children = [
  10. # Starts a worker by calling: Partizan.Worker.start_link(arg)
  11. worker(Partizan.Makine, [])
  12. ]
  13. # See https://hexdocs.pm/elixir/Supervisor.html
  14. # for other strategies and supported options
  15. opts = [strategy: :one_for_one, name: Partizan.Supervisor]
  16. Supervisor.start_link(children, opts)
  17. end
  18. end