Feature: Add Task dependencies to allow auto stacking and upload on scan completion - #143
Open
esto-openscan wants to merge 8 commits into
Open
Feature: Add Task dependencies to allow auto stacking and upload on scan completion#143esto-openscan wants to merge 8 commits into
esto-openscan wants to merge 8 commits into
Conversation
- Introduced `depends_on` parameter for creating tasks with prerequisites. - Tasks can now wait for specified dependencies to complete before execution. - Added validation to prevent cyclic dependencies and ensure dependency existence. - Updated task manager to handle dependency-based scheduling and error propagation. - Enhanced tests to cover dependency scenarios, including successful execution and failure cases. - Applied changes across all API versions (`v0.8`, `v0.9`, `next`).
- Added integration tests for real-world task dependency chains, including success, failure, and cancellation propagation. - Enhanced unit tests to validate edge cases like cyclic dependencies, missing dependencies, and task completion after dependencies.
- Updated task manager to set all non-terminal tasks (e.g., pending, running, paused) to `INTERRUPTED` on app shutdown. - Added `_consume_completed_dependency` to detach completed dependencies from waiting tasks. - Enhanced scheduling logic to handle manually restarted tasks with dependencies. - Improved test coverage for task recovery scenarios, including shutdown interruptions, manual restarts, and dependency completions.
…versions - Introduced `depends_on` parameter to enable task chaining by making one task wait for the completion of another. - Updated scan, focus-stacking, and cloud-upload endpoints to support this feature. - Clarified usage of generic task endpoints for experimental tasks; domain-specific tasks must use their dedicated endpoints. - Added validation and error handling for dependency scenarios across task services. - Enhanced tests to cover dependency chains, including prerequisites and error propagation. - Updated documentation for task dependency features and endpoint usage.
- Added `depends_on` parameter across all API versions (`v0.8`, `v0.9`, `next`) to enable task dependency chaining. - Updated task descriptions to document new dependency functionality. - Improved schema and query validation for handling prerequisite tasks.
…workflow - Updated logic to handle interrupted tasks by resuming with persisted progress or recreating missing tasks. - Added deletion of terminal tasks during new focus stacking runs to prevent duplicate records. - Improved `resume_task` and `restart_task` behavior for interrupted tasks, differentiating them from paused or failed tasks. - Expanded test coverage for interrupted task scenarios, including persistence and recovery.
…ery and improve docs and API specs - Enhanced handling of interrupted focus stacking and scan tasks, reusing progress and batching. - Added task replacement logic to retain dependent task chains during recovery. - Updated endpoints (`/resume`) to reflect changes for interrupted task resumption and dependency management. - Improved test coverage for task replacement, dependency retention, and task-state persistence. - Updated changelog to reflect focus stacking and scan task recoverability.
…sk-related test cases - Updated test case names to emphasize lack of dependency inheritance in task replacements. - Adjusted assertions to reflect changes in dependency assignment for replaced tasks. - Refactored related service logic to simplify dependency management.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Tasks can now be chained by making one task depend on another. Dependent tasks wait for successful completion of their prerequisite. Added a new
depends_onfield to Tasks and added Task Manager logic.Closes #126