Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: ParentJob Not starting when children is already completed #2554

Closed
1 task done
leegunwoo98 opened this issue May 3, 2024 · 0 comments · Fixed by #2627
Closed
1 task done

[Bug]: ParentJob Not starting when children is already completed #2554

leegunwoo98 opened this issue May 3, 2024 · 0 comments · Fixed by #2627
Labels
bug Something isn't working

Comments

@leegunwoo98
Copy link

Version

v5.5.0

Platform

NodeJS

What happened?

Let's say in this structure:
const originalTree = await flow.add({
name: 'root-job',
id :1,
queueName: 'topQueueName',
opts:{ removeOnComplete:true}
data: {},
children: [
{
name,
id :1,
data: { idx: 0, foo: 'bar' },
queueName: 'childrenQueueName',
children: [
{
name,
id :1,
data: { idx: 1, foo: 'bah' },
queueName: 'grandChildrenQueueName',
},
{
name,
id :1,
data: { idx: 2, foo: 'baz' },
queueName: 'grandChildrenQueueName',
},
],
},
{
name,
id :1,
data: { idx: 3, foo: 'foo' },
queueName: 'childrenQueueName',
},
],
});

The root job has the option to removeOnComplete to true. Thus, when everything is finished, the root-job will be deleted and the rest of the Queues still has the completed job of id :1.

Now, if I add the same flow with the same ids, the expected behavior should be that the child queues will not be reprocessed since the jobs are complete, and only the root-job will have processed. However, it seems that the root job will stay in the waiting children state forever. The only way I was able to start the root-job was to delete the direct childrens (either idx:3 or idx: 0) and add the flow again.

The correct behavior should be to start the root-job even when the child jobs are already completed.

How to reproduce.

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@leegunwoo98 leegunwoo98 added the bug Something isn't working label May 3, 2024
github-actions bot pushed a commit that referenced this issue Jul 10, 2024
## [5.8.5](v5.8.4...v5.8.5) (2024-07-10)

### Bug Fixes

* **parent:** consider re-adding child that is in completed state using same jobIds ([#2627](#2627)) (python) fixes [#2554](#2554) ([00cd017](00cd017))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant