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

[FEATURE] TaskWrapper API endpoint #906

Closed
6 tasks
Tracked by #918 ...
zyronix opened this issue Apr 7, 2023 · 4 comments
Closed
6 tasks
Tracked by #918 ...

[FEATURE] TaskWrapper API endpoint #906

zyronix opened this issue Apr 7, 2023 · 4 comments
Assignees

Comments

@zyronix
Copy link
Member

zyronix commented Apr 7, 2023

Currently there is only a Task endpoint, but when you for example set the priority of the Task you are not setting it of the TaskWrapper. But the TaskWrapper is used to determine the real priority.

Todo's:

  • Design how to do the interaction with TaskWrappers
  • Create?
  • Delete?
  • Update?
  • Tests
  • Expanding
@zyronix zyronix changed the title [API] TaspWrapper API endpoint [API] TaskWrapper API endpoint Apr 7, 2023
@zyronix zyronix moved this to 🏗 In progress in Development Plans Apr 7, 2023
@zyronix zyronix self-assigned this Apr 7, 2023
@zyronix zyronix changed the title [API] TaskWrapper API endpoint [FEATURE] TaskWrapper API endpoint Jun 16, 2023
@rixvet
Copy link
Collaborator

rixvet commented Aug 24, 2023

As an Proof-Of-Concept implementation:

  • Create Task via Task object
  • Create Supertask via /api/v2/helper/createSupertask
  • Update TaskWrapper via /api/v2/ui/taskwrappers/ PATCH method
  • Delete via /apt/v2/ui/taskwrappers DELETE method

I do think it needs some rethinking though, since we are traversing multiple models objects within an object. It almost feels like it needs 'hide' the taskwrapper, behind regular Task/Supertask objects, how-ever this is currently blocked because of the Supertask object being 'abused' as SupertaskTemplate (#918).

@rixvet
Copy link
Collaborator

rixvet commented Sep 5, 2023

When thinking about dropping TaskWrapper in favor of two separate entities. Since the implementation of 'Task' (which might be an supertask, and the TaskWrapper as an, ehm, 'wrapper', makes the whole behaviour rather confusing.

Let's think conceptually. We have something correspond to a single task and the other thing which corresponds to a 'group of tasks'. We also have have an 'template for tasks' and 'template for a group of tasks'.

Current implementation

  • 'single task': Task
  • 'group of tasks': 'special' Task (e.g. mangling with TaskWrapper et. al)
  • 'template for tasks': PreTask
  • 'template for a group of tasks': SuperTask

Re-design considerations

  • Avoid 'rebranding' objects, since this will cause highly confusing behaviour both in communication and development.
  • Avoid model change behaviour based on fields of the model.

Future

  • 'Task' is clear, if an user creates an Task, it expect this to be an single task.
  • PreTask is not clear, it sounds like something which needs to be done before an Task is executed (think of PreProcessor). More-over one can argue it makes more sense to call an Task template 'TaskTemplate'
  • SuperTask is not clear, it does not imply 'template' of 'pre' anything. From first glance one would expect it to be 'running SuperTasks'. Renaming it to 'SuperTaskTemplate' makes more since. Conceptually.
  • SuperTask (as in running SuperTask) is the one which is going to cause issues, since it was first reserved for the template and should now be used for the running supertask instead.

Alternative naming SuperTask
To avoid confusion an alternative name can be considered, some alternatives:

  • TaskGroup (potentially confusing: Group in context is now used for 'group of users' or 'group of agent' which is entity based)
  • TaskCollection
  • MultiTask
  • TaskList
  • MegaTask

Sentences to consider, which should make a nice ring to it:

  • Apply to hashlist'
  • Add TaskTemplate 12 to Template'
  • Raise priority of 123 to 100'

@zyronix
Copy link
Member Author

zyronix commented Sep 5, 2023

Nice comments! Could you create a new item for this called something like "redesign TasWrapper, SuperTask, Task"

@rixvet
Copy link
Collaborator

rixvet commented Sep 6, 2023

Nice comments! Could you create a new item for this called something like "redesign TasWrapper, SuperTask, Task"

Good idea: #991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants