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
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
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
Hey all,
I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
Hi everyone,
I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Other popular topics
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
Hi there,
I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Lets say I have map like this fetching from my database
%{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
What is the idiomatic way of matching for not nil in Elixir?
E.g.,
First way:
defp halt_if_not_signed_in(conn, signed_in_account) when...
New
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!)
This post collects co...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
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










