Replies: 1 comment
-
can you please check some related issues with the canvas tag? this type of issue might already exist. or might not so checking the tagged issues would be helpful. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Consider the following two-step algorithm:
Where task
B{i}
depends on tasksA{i-1}
andA{i}
.The question is how to execute this workflow with Celery such that:
A
task is executed twice.B
task can start as soon as bothA
tasks it depends on are finished?I've tried the following options but none has both properties.
Option 1: Two groups
I have split the two iterations into two separate groups like this.
The problem with this execution is that the whole group with
A
tasks needs to finish before theB
group can start. This leads to the desired result but not to the optimal utilization of the resources.Option 2: Chords
The problem here is that
A.s(2)
is called twice. I can manage this inside of my application but that requires sort of distributed locks and more careful handling of what is already done and what needs to be done. ExecutingA.s(2)
twice is not an option. Tasks are idempotent but the execution takes too long.This is based on my question at StackOverflow.
Beta Was this translation helpful? Give feedback.
All reactions