I am doing as written below in my project. But I only want to run it in Production mode, not in development mode, for this, I tried with Mix.env and it worked locally by giving me :dev or :prod but It didn't work on online API. It got an error as there is nothing like env.
I want to make it just for production with some kind of pattern matching function
Task.start(fn ->
if user |> Intercom.get_user |> intercom_user? do
Logger.info "User '#{user.username}' already present at Intercom."
else
Intercom.create_user(user, user_agent, requester_ip)
end
end)
any help will be appreciated!