Skip to content

Commit 7ecbbe3

Browse files
committed
refactor: Improve task update methods and enhance TaskModel for better maintainability
1 parent a6ebdd3 commit 7ecbbe3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Changelog
22

3-
43
## [Unreleased]
54

65
### Added
@@ -73,6 +72,12 @@
7372
- Implemented priority grouping for better task scheduling
7473
- Optimized task tree retrieval using `task_tree_id` with fallback mechanism
7574

75+
- **TaskRepository Refactored**
76+
- Refactored task update methods in `TaskRepository` for improved maintainability and clarity.
77+
- Use the method `task_update(self, task_id: str, **kwargs)` instead of all `update_task_*` series functions.
78+
- Refactored `TaskModel` to `TaskModelType` and enhanced task creation methods for better type safety and extensibility.
79+
80+
7681
### Fixed
7782
- **Database Schema Management**
7883
- Simplified TaskRepository initialization by removing custom column checks
@@ -915,7 +920,7 @@
915920
- Other fields: Can be updated freely without status restrictions (inputs, name, priority, params, schemas, status, result, error, progress, timestamps)
916921
- Comprehensive error reporting: All validation errors are collected and returned in a single response
917922
- New TaskRepository methods:
918-
- `update_task_dependencies()`: Update task dependencies with validation
923+
- `update_task()`: Update task dependencies with validation
919924
- `update_task_name()`: Update task name
920925
- `update_task_priority()`: Update task priority
921926
- `update_task_params()`: Update executor parameters

0 commit comments

Comments
 (0)