aboutsummaryrefslogtreecommitdiff
path: root/launcher/tasks
AgeCommit message (Collapse)Author
2022-09-20refactor: setAbortStatus -> setAbortableflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-20feat: add canAbort() status change in Taskflow
By now, it's a recurring pattern of wanting to restrict aborting in certain situations. This avoids further code duplication, and adds a signal that external users can hook up to to respond to such change. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-09-11refactor: restructure testsSefa Eyeoglu
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2022-09-07fix: start at least one task in ConcurrentTaskflow
This allows us to emit all the necessary stuff when we're finished in the case of starting a task with no subtasks. In particular, this caused the mod updater to not work properly :) Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: make MultipleOptionsTask inherit directly from SequentialTaskflow
It's not a good idea to have multiple concurrent tasks running on a sequential thing like this one. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28feat(test): add more tests to Tasksflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28refactor: make MultipleOptionsTask inherit from ConcurrentTask tooflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28refactor: make SequentialTask inherit from ConcurrentTaskflow
In a way, sequential tasks are just concurrent tasks with only a single task running concurrently, so we can remove LOTS of duplicated logic :) Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: abort logic running subsequent tasks anyways some timesflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: 'succeeded while not running' spam in ConcurrentTaskflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: bogus progress update when the total step progress was zeroflow
Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28fix: only try to start tasks that are really thereflow
This fixes an annoying issue where concurrent tasks would try to start multiple tasks even when there was not that many tasks to run in the first place, causing some amount of log spam. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-08-28Merge pull request #1052 from flowln/resource_modelSefa Eyeoglu
2022-08-20feat: make Task a QRunnableflow
This makes it possible to run a task in another thread. I added a variable to toggle debug prints because they seem to trigger an assertion on Qt internals when the task in on another thread. Of course, this isn't awesome, but can wait until we improve our logging. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-24fix: pump events and do a queued start for concurrent tasksflow
Heavy workloads can consume a ton of time doing their stuff, and starve the event loop out of events. This adds an event processing call after every concurrent task has been completed, to decrease the event loop stravation on such loads. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17feat: add MultipleOptionsTaskflow
This is a variation of a Sequential Task, in which a subtask failing will prompt the next one to execute, and a subtask being successful will stop the task. This way, this can be used for easily managing fallbacks with tasks. :D Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-17fix: always update global progress of sequential tasksflow
Previously, it would not update the global counter if the subTask didn't update its progress, even though progress was being made. This also prevents a segmentation fault while aborting the task. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-07-02Merge pull request #784 from Scrumplex/refactor-cmakeflow
Refactor tests
2022-07-01feat: add ConcurrentTaskflow
This tasks (or rather, meta-task) has the ability to run several other sub tasks concurrently. Signed-off-by: flow <flowlnlnln@gmail.com>
2022-06-14refactor: move away from UnitTest.cmakeSefa Eyeoglu
2022-06-04Merge pull request #426 from flowln/mod_permaSefa Eyeoglu
Add on-disk mod metadata information
2022-05-24fix: better handle corner caseflow
2022-05-23feat(ui): adapt SequentialTask to nested SequentialTasksflow
2022-05-21fix: various issues with ProgressDialog and SequentialTasksflow
- Fix aborting sequential tasks - Fix displaying wrong number of tasks concluded - Fix text cutting when the URL is too big
2022-05-17fix: virtual signal in Task.hflow
2022-05-12chore: add license header to remaining filesflow
Also remove some unused imports
2022-05-12fix: abort and fail logic in tasksflow
Also sets up correctly the status connections
2022-05-12refactor: remove some superfluous signalsflow
Since now we're inheriting from Task, some signals can be reused.
2022-05-12refactor: organize a little more the code in launcher/net/flow
This also reduces some code duplication by using some Task logic in NetAction.
2022-04-07test: add new test to Task testflow
Also adds one more check to setStatus test
2022-04-07test: add basic Task unit testflow
Only only two tests for now. We can iterate on this later :^) This is to try to avoid breaking things again!
2022-04-07fix: issue with status of non-sequencial tasksflow
2022-04-01feat: Use a single progress dialog when doing multiple tasksflow
This puts all mod downloading tasks inside a SequentialTask, which is, for more than one task, a multi step task. This is handled by the ProgressDialog by showing both the global progress of tasks executed, and the individual progress of each of them.
2021-11-21NOISSUE more refactoringPetr Mrázek
2021-11-21NOISSUE continue refactoring things to make tests passPetr Mrázek
2021-11-20NOISSUE fix buildPetr Mrázek
2021-10-21NOISSUE continue debranding...Petr Mrázek
2021-07-25NOISSUE Flatten gui and logic libraries into MultiMCPetr Mrázek