You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I'm trying to traverse a flow from an intermediate node (e.g. one that has both a parent and children) in order to get a "state of the world" type of representation (e.g. all jobs in the flow, flattened, possibly represented as their names mapped to their errors or returnvalue or something else).
While traversing the tree downstream is possible by either invoking Job#getDependencies() or FlowProducer#getFlow(), it's less straightforward to fetch a Job instance representing the parent of a job, as parentKey.queueKey contains the fully qualified (i.e. prefixed by bull:) key of the queue which I cannot really do anything with.
Describe the solution you'd like
I'd like a getter on Job that would return another Job instance representing its parent job, if exists.
Describe alternatives you've considered
I implemented a utility function that effectively reverses QueueKeys#getQueueQualifiedName() thus returning the queue name from a qualified queue key by removing the prefix. This lets me use FlowProducer#getFlow() to fetch the parent job.
Additional context
No additional context I'm aware of.
The text was updated successfully, but these errors were encountered:
brncsk
changed the title
Traversing a flow tree starting from an intermediate node
Fetching a job's parent job (traversing a flow tree starting from an intermediate node)
Sep 12, 2024
Is your feature request related to a problem? Please describe.
I'm trying to traverse a flow from an intermediate node (e.g. one that has both a parent and children) in order to get a "state of the world" type of representation (e.g. all jobs in the flow, flattened, possibly represented as their names mapped to their errors or
returnvalue
or something else).While traversing the tree downstream is possible by either invoking
Job#getDependencies()
orFlowProducer#getFlow()
, it's less straightforward to fetch aJob
instance representing the parent of a job, asparentKey.queueKey
contains the fully qualified (i.e. prefixed bybull:
) key of the queue which I cannot really do anything with.Describe the solution you'd like
I'd like a getter on
Job
that would return anotherJob
instance representing its parent job, if exists.Describe alternatives you've considered
I implemented a utility function that effectively reverses
QueueKeys#getQueueQualifiedName()
thus returning the queue name from a qualified queue key by removing the prefix. This lets me useFlowProducer#getFlow()
to fetch the parent job.Additional context
No additional context I'm aware of.
The text was updated successfully, but these errors were encountered: