ryanwinchester
Add_graft not adding to context
It’s looking to me like my Oban.Pro.Workflow.add_graft is not adding to context, but in the docs it does
def new_workflow do
Workflow.new()
|> Workflow.put_context(context)
|> Workflow.add_graft(:foo, &graft_foo/1)
|> Workflow.add_cascade(:bar, &bar/1, deps: [:foo])
|> Oban.insert_all()
end
def graft_foo(_) do
Workflow.new()
|> Workflow.add(:foo_id, foo_worker)
|> Workflow.apply_graft()
|> Oban.insert_all()
end
def bar(context) do
%{foo: _} = context
# ...
end
foo will not be in the context…
Marked As Solved
sorentwo
Oban Core Team
Confirmed that this is an issue with v1.6.0 (proper). Will have a fix soon for v1.6.1. Thanks for the report, as always ![]()
1
Also Liked
ryanwinchester
No, this one was my fault.
I didn’t realize you need to add it to deps for the context to be merged. I only had the step I was waiting on,
e.g. step 3 waits on 2 and step 2 waits on 1.
If I want context from 1 and 2 in step 3, even if I technically only need to wait on 2, I still need to add both as deps to step 3.
1
Last Post!
ryanwinchester
looks like the same ones missing from earlier
i’m skipping the tests for now. it works as intended manually testing the application
will dig in deeper at another time
0
Popular in Questions
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
Using vs code and installed ElixirLS: support and debugger.
And I got an error popped up on start up says
Failed to run ‘elixir’ comma...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Other popular topics
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
New
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
Hi,
I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










