Skip to content

Instantly share code, notes, and snippets.

@desmondmonster
Last active March 14, 2018 18:16
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/93118d574a6ae5a1d114a78a4ecea9f0 to your computer and use it in GitHub Desktop.
Save desmondmonster/93118d574a6ae5a1d114a78a4ecea9f0 to your computer and use it in GitHub Desktop.
Application starting an email-sending Worker
defmodule PopularApp.Application do
use Application
def start(_type, _args) do
import Supervisor.Spec
children = [
worker(PopularApp.EmailSender, [])
]
opts = [strategy: :one_for_one, name: PopularApp.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