feat: add task command to client and Title method to Task for tasks queue managing, #157

This commit is contained in:
krau
2025-12-15 11:29:55 +08:00
parent 51198a1e3d
commit 0ca3d97711
12 changed files with 210 additions and 24 deletions

View File

@@ -125,6 +125,7 @@ func (tq *TaskQueue[T]) RunningTasks() []TaskInfo {
}
tasks = append(tasks, TaskInfo{
ID: task.ID,
Title: task.Title,
Created: task.created,
Cancelled: task.Cancelled(),
})
@@ -144,6 +145,7 @@ func (tq *TaskQueue[T]) QueuedTasks() []TaskInfo {
if !task.Cancelled() {
tasks = append(tasks, TaskInfo{
ID: task.ID,
Title: task.Title,
Created: task.created,
Cancelled: task.Cancelled(),
})