In 1.5 we used the following pipeline-configuration
pipeline: [local_limit: 4, global_limit: [allowed: 1, partition: [args: [:some_identifier]]]]
This worked as expected, only four workflows at a time ran, partitioned by the args specified.
Essentially we just build a workflow consisting of multiple steps.
Workflow.new(workflow_name: "Workflow")
|> Workflow.add(:instance, StartInstance.new(%{some_identifier: "abc"}))
|> Workflow.add(:do_stuff, DoStuff.new(%{some_identifier: "abc"}), deps: [:instance])
|> Workflow.add(:do_more_stuff, DoMoreStuff.new(%{some_identifier: "abc"}), deps: [:do_stuff])
|> Workflow.add(:do_extra_stuff, DoExtraStuff.new(%{some_identifier: "abc"}), deps: [:do_more_stuff])
So it’s a linear flow, the :instance job has priority of 9 (this is the problem we’re solving for, we can only run four instances at a time) and the others default 0. However, we still see new instance jobs being fired off when the workflow isn’t completed, this was not the case in 1.5 where all jobs in the workflow completed before a new instance job could start. If we look at the available jobs we see all the StartInstance jobs being queued up, but this is as expected(?) and in available we see all of the follow-up jobs that are supposed to happen after the StartInstance jobs.
I’m at a bit of a loss here because I don’t see how this could happen given priorities and limits.




















