Last active
March 14, 2018 18:16
-
-
Save desmondmonster/93118d574a6ae5a1d114a78a4ecea9f0 to your computer and use it in GitHub Desktop.
Application starting an email-sending Worker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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