hashtopolis / server

Hashtopolis - distributed password cracking with Hashcat
GNU General Public License v3.0
1.45k stars 220 forks source link

[BUG]: Settings priority in #/tasks/show-tasks for normal task does not apply to taskwrapper #989

Closed zyronix closed 1 year ago

zyronix commented 1 year ago

Version Information

master

Hashcat

No response

Description

When I set the priority of a normal task (not a runningSuperTask). The priority is not applied on the TaskWrapper database object, and thus the priority is not implemented.

When patching priority and maxagent on a Task object, also reverse patch the taskwrapper object if it is not a supertask.

rixvet commented 1 year ago

This almost feels something which is a necessary evil to implement. It breaks the basic concepts of the APIv2/ui section modelling since this will causes changes at one model be effected to other models 'magically', which should be an helper function, how-ever since going forward we want to hide the 'TaskWrapper' object (again see #906) so let's go for it :innocent:

zyronix commented 1 year ago

Another solution could be to make the task view about viewing taskwrappers. Once clicked you'll view the tasks inside the taskwrapper; even when only one task is available. The only behavior is that when tasktype is task and not supertask, the priority and maxagents cannot be patched through the api. As they can only bet set on the taskwrapper. What you think about this idea?

rixvet commented 1 year ago

Another solution could be to make the task view about viewing taskwrappers. Once clicked you'll view the tasks inside the taskwrapper; even when only one task is available. The only behavior is that when tasktype is task and not supertask, the priority and maxagents cannot be patched through the api. As they can only bet set on the taskwrapper. What you think about this idea?

I think it is rather confusing, both from a design point-of-view as from user point-of-view, since this means we updating/creation behavior based on conditionals within the object. Maybe hiding the taskWrapper completely and deal with an new endpoint for 'group of tasks' makes it easier to understand. Let's think of it in the context of #991.