feat: add task running status #88

This commit is contained in:
duorameng
2026-04-30 15:44:45 +08:00
parent 03cdb38ef6
commit 404a1a4bfe
5 changed files with 76 additions and 35 deletions
+7
View File
@@ -99,6 +99,13 @@ type Task struct {
UpdatedAt LocalTime `json:"updated_at"`
}
func (t *Task) IsRunning() bool {
if string(t.RunningGo) == "" || string(t.RunningGo) == "[]" {
return false
}
return true
}
func (Task) TableName() string {
return constant.TablePrefix + "tasks"
}