By adding a parameter in TaskStorage, it is now possible to distinguish between finished and unfinished tasks.
Finished tasks are those tasks that have a status of Task::COMPLETED or Task::CANCELLED. Unfinished tasks are all others.
This allows the SuperVisor to not bother with the mountain of tasks that will be saved during large projects.
Dependencies can now pass output to each other using the DependentTaskHandler.
Also fixed some general problems in the Tasks class, for instance the Executor not starting correctly because of problematic parameters.
Also, SuperVisor now sets the output of a Task using the last output of the task, and not the first.
When providing $attempt = 0 at readTaskOutput and readPostOutput, all output shall be returned.
This is the default return. Hence, a lot of tests had to be altered slightly.
Redis now saves all output for a task within a hash. This hash contains individual tasks and all its output.
Attempts also start at 1, since that makes most sense for this context. When output is written, the TaskStorage must figure out at which attempt the Task is.
Parent Handlers can be stacked to run in succession. Output is transfered as input into the child handler which can continue with it. If the parent Handler fails, all Child handlers also fail.
Handlers should now be added as objects, adding some flexibility to the developer.
Developers are still cautioned to take great care that Handlers work approriately. Handlers can potentially crash the SuperVisor if not taken good care of.
Event gets fired when an Event is modified by sending it to TaskStorage::modifyEvent. This allows components to observe changes and report these to the user. Might also be useful to cancel unwanted changes.
ControllerHandler is a standard utility handler for MVCR Controllers. This allows the user to create a task which is handled by a standardized controller.
Not finished yet! Needs some love.
Add 'addTasks' method to `Tasks` class
Implemented basic RedisTaskStorage.
- Fixed bug where worker is not provided with bootstrap by ShellExecutor.
- Added composer and Redis to Dockerfile
- Added more output to ParallelSuperVisor
Updated config format.
Implemented changes to binaries. Binaries now accept a 'bootstrap' argument, allowing the developer to load a custom bootstrap from the project they're working on.
This allows Async to run in the same environment as the project it's part of.
Co-authored-by: Abel Hoogeveen <abel@techfuze.net>
Reviewed-on: #4
- Fixed bug where worker is not provided with bootstrap by ShellExecutor.
- Added composer and Redis to Dockerfile
- Added more output to ParallelSuperVisor
Initial release.
Removed Tracy dependency
Implemented dependencyConstraint.
Partially fixes#3.
Built foundation.
System is now fully in a working order, though many parts must still be developed.
System still requires the following components:
- Dependency Constraint. Only run when all dependencies have ran.
- TaskScheduler. Standardized task that plans task periodically and maintains consistency.
- Better TaskStorage.
- Proper documentation
Brought everything back into working condition.
Also updated all copyright notices.
Moved files into right place.
Co-authored-by: Abel Hoogeveen <abel@techfuze.net>
Reviewed-on: #1