Created
January 31, 2019 19:39
-
-
Save tzumby/c7226738dbafc8acf3235db616441854 to your computer and use it in GitHub Desktop.
Crypto Prices application
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 CryptoPrices.Application do | |
# See https://hexdocs.pm/elixir/Application.html | |
# for more information on OTP Applications | |
@moduledoc false | |
use Application | |
def start(_type, _args) do | |
# List all child processes to be supervised | |
children = [ | |
# Starts a worker by calling: CryptoPrices.Worker.start_link(arg) | |
# {CryptoPrices.Worker, arg}, | |
CryptoPrices.Aggregator.Supervisor | |
] | |
# See https://hexdocs.pm/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: CryptoPrices.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