-
Notifications
You must be signed in to change notification settings - Fork 321
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
Feature/multiinstance refactor #292
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, lratm (looks really awesome to me).
waiting = [] | ||
for sp in subprocesses: | ||
completed = sorted( | ||
[t for t in subprocesses[sp]['tasks'].values() if t['state'] in [32, 64] ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safer/more obvious to use the finished mask?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to leave these as ints, since that's what's in the serialied version.
for sp in [dct] + list(subprocesses.values()): | ||
for task_id, task in sp['tasks'].items(): | ||
if task_id in waiting: | ||
task['state'] = 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing-ish here - TaskState.WAITING?
SonarCloud Quality Gate failed. |
This is a complete refactor of how we handle multiinstance tasks. We no longer:
predict
During parsing, a multiinstance task is added to the spec, with a reference to the original task spec. When the MI task is reached, it changes state to waiting and creates children from the original referenced spec as needed, merges the data from the children into the original task as they are completed, and when all children are complete, moves to ready/complete.
This GREATLY simplifies dealing with multiinstance tasks.