rameshsharma
Task.async not working in azure environment
I am using Task.async to move a task in background. It is working fine in my local.
But when the code is deployed to azure environment it is not working.
Is there anything specifically I need to mention to make it work in environment.
Please suggest. My code below:-
‘’’
a = Task.async(fn →
verify_customer(current_user, first_pension)
end)
Task.await(a)
‘’’
Most Liked
rameshsharma
Issue is resolved…The problem was with the fallback controller. Thanks all.
Nicd
We need more information, just “not working” doesn’t tell us what might be wrong. Is there a crash? Are ther error logs? How did you build and deploy the code to Azure?
Note that the example you provided doesn’t make much sense, as it’s nearly the same as just running verify_customer(current_user, first_pension) in the original process. What are you aiming to accomplish with this task?
GunnarPDX
Have you tried running it without Task.async/await in prod? It’s really hard to help without error logs, the issue could be caused by a number of things unrelated to Task.async such as missing .env variables.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








