Delegating set_parent_task to ProcessInfo.__init__ #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Jedie,
working a bit on the subtasks, I realized that currently, we have to link to
parent_task_id
two times:first through the task code through the manager:
and second, we have to feed
ProcessInfo
withparent_task_id
I initially thought that within
ProcessInfo.__init__
we should readparent_task_id
from the task.Then I realized that, as
ProcessInfo.__init__
is anyway used to update fields from TaskModel,it should be better to keep the same logic, and allow
ProcessInfo.__init__
to generate the link between parent_task and sub_task ifparent_task_id
is provided.That way, we gain a step, and the process of creating sub tasks is much easier (especially for new users).
And all previous implementations are still working the same (we just update the link between parent and sub task for nothing)