Skip to content

Instantly share code, notes, and snippets.

@paveltyk
Created January 6, 2021 11:42
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 paveltyk/b666c57800cfe035941657819144416a to your computer and use it in GitHub Desktop.
Save paveltyk/b666c57800cfe035941657819144416a to your computer and use it in GitHub Desktop.
defmodule GoogleStorage.Application do
# ...
@impl true
def start(_type, _args) do
producer_module = Application.get_env(:google_storage, :producer_module)
children = [
{GoogleStorage.Pipeline, [producer_module: producer_module]}
]
opts = [strategy: :one_for_one, name: GoogleStorage.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