bgoosman

bgoosman

Oban Pro - allow the end-user to run each workflow on its own or all together in a chain?

Let’s say I have three workflows: WorkflowA, WorkflowB, and WorkflowC.

Each Workflow spawns 10 child jobs using Workflow.append().

I’d like to mix and match A, B, and C in different orders. Something like:

Workflow.new()
|> Workflow.add(:a, WorkflowA.new(%{id: 1}))
|> Workflow.add(:b, WorkflowB.new(%{id: 2}), deps: [:a])
|> Workflow.add(:c, WorkflowC.new(%{id: 3}), deps: [:b])
|> Oban.insert_all()

or

Workflow.new()
|> Workflow.add(:b, WorkflowB.new(%{id: 2}))
|> Workflow.add(:a, WorkflowA.new(%{id: 1}), deps: [:b])
|> Workflow.add(:c, WorkflowC.new(%{id: 3}), deps: [:a])
|> Oban.insert_all()

The use case is allowing the end-user to run each workflow on its own, or all together in a chain.

First Post!

sorenone

sorenone

Oban Core Team

Is this about composing workflow jobs, or entire workflows? You can can mix-n-match any jobs you like into a workflow (in v1.5 they don’t even need to be Workflow jobs).

However, if you desire making a Workflow within Workflows? If so, you’re not the first. Won’t be the last. It’s slated for v1.6.

Help us understand the question more and we can be more specific. :sparkles:

Where Next?

Popular in Questions Top

logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
gshaw
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
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
hpopp
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
joaquinalcerro
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 record...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

We're in Beta

About us Mission Statement