Created
June 11, 2019 10:40
-
-
Save adrianparvino/c533513e9ccad196760ae2f72b24c230 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 TermuxSmsCli.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 = if System.get_env("ANDROID_ROOT") do | |
[ { TermuxSmsCli.Fetcher, name: TermuxSmsCli.Fetcher } | |
] else | |
[ | |
] end | |
# See https://hexdocs.pm/elixir/Supervisor.html | |
# for other strategies and supported options | |
opts = [strategy: :one_for_one, name: TermuxSmsCli.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