fix: add IsCreated flag to reliably track task creation state (#1314)

This commit is contained in:
Wang YiJia authored and GitHub committed 2026-03-18 18:35:39 +08:00
1 parent 09f7c88ed3
commit 3d20e818e5
2 files changed
+6 -5

No files matched your search

+2
View File
@@ -27,6 +27,7 @@ type Task struct {
Status base.Status `json:"status"`
Uploading bool `json:"uploading"`
Progress *Progress `json:"progress"`
IsCreated bool `json:"isCreated"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
@@ -49,6 +50,7 @@ func NewTask() *Task {
Status: base.DownloadStatusReady,
CreatedAt: time.Now(),
UpdatedAt: time.Now(),
IsCreated: false,
}
}