Break a Flow chain
See original GitHub issueI’ve made a nested flow jobs,
{
"queueName": "Predictions",
"data": {
"uuid": "123"
},
"name": "notifyWebhook",
"children": [
{
"queueName": "Predictions",
"data": {
"uuid": "123"
},
"name": "predict",
"children": [
{
"queueName": "Predictions",
"data": {
"uuid": "123"
},
"name": "transcript",
"children": [
{
"queueName": "Predictions",
"data": {
"uuid": "123"
},
"name": "cutPromo",
"children": [
{
"queueName": "Predictions",
"data": {
"uuid": "123"
},
"name": "download"
}
]
}
]
}
]
}
]
}
There is any way to break the flow chain if the download job fails?
I’ve tried to throw new exception, I see the download job fails, but all the jobs that are dependent on it are still exists in redis.
What I want is to be able to remove the entire chain if download job is failed.
Any suggestions?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
How to escape or break the chain flow in underscore/lodash
Show activity on this post. Here is a lodash chain that returned an ordered, uniquely sorted array of integer. Because the input can...
Read more >What is Flow? A complete guide to the Flow blockchain
The Flow Blockchain helps power some of the most popular apps, games, and digital assets. Here's everything you need to know.
Read more >Flow (@flow_blockchain) / Twitter
Infrastructure | Flow was built not to break under the stress of major NFT collections. Founded by the team behind one of the...
Read more >break - JavaScript - MDN Web Docs - Mozilla
The break statement terminates the current loop, switch, or label statement and transfers program control to the statement following the ...
Read more >7.10 Break and Continue Statements | Stan Reference Manual
The one-token statements continue and break may be used within loops to alter control flow; continue causes the next iteration of the loop...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

flows are a quite new feature so we are still adding functionality. Failing a flow when one of the jobs fails could be one of them.
From a cursory look, we can get the parent id from the job, then get the wait children key based on that. From there we can cancel all children jobs by id using the API.
I think it would be a good candidate for a PR, in addition to the basic operation of getting all jobs relating to a Flow.