Last active
March 14, 2018 23:31
-
-
Save desmondmonster/e35fe4e14e9e282dfafb02fcc4d8edf3 to your computer and use it in GitHub Desktop.
Account Setup Task Supervisor
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 YourApp.AccountSetupSupervisor do | |
def set_up_user_account(user) do | |
opts = [restart: :transient] | |
Task.Supervisor.start_child(__MODULE__, YourApp.CRM, :create_user, [user], opts) | |
Task.Supervisor.start_child(__MODULE__, YourApp.Fulfillment, :set_nearest_location, [user], opts) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment