How to cancel a batch and all child batches within that? #6224
Replies: 1 comment
-
You'd need to implement that yourself. Child batches can get access to their parent but parent batches do not have easy access to their children. You could create an overall "task id" which every job within the "pyramid of work" knows about. Each job would check if that task id has been cancelled. |
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
-
I have a flow where I am creating child batches within child batches within child batches and am trying to figure out a good way to cancel all jobs easily. This is potentially how my batches would look like except there will be many more:
Through some testing I have seen that
batch.invalidate_all
called on batch 1 only applies to jobs within that batch (jobs 2, 3) and not through the child batches (2, 3, 4). So what is the best method to invalidating all jobs cascading down from a parent batch and not just the first layer.Beta Was this translation helpful? Give feedback.
All reactions