Skip to content

Instantly share code, notes, and snippets.

@desmondmonster
Last active March 14, 2018 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desmondmonster/03f04e73d0ed809ff3666c5b2fa9e03d to your computer and use it in GitHub Desktop.
Save desmondmonster/03f04e73d0ed809ff3666c5b2fa9e03d to your computer and use it in GitHub Desktop.
Application With Worker
defmodule YourApp.Application do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
{Task.Supervisor, name: YourApp.AccountSetupSupervisor}
]
opts = [strategy: :one_for_one, name: YourApp.Supervisor]
Supervisor.start_link(children, opts)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment