2023-05-11 16:25:46 +08:00
committed by GitHub
parent 58dfaf3a75
commit f6e029e6c7
10 changed files with 128 additions and 106 deletions

View File

@ -6,10 +6,7 @@ package structs
// TaskType defines task type
type TaskType int
// all kinds of task types
const (
TaskTypeMigrateRepo TaskType = iota // migrate repository from external or local disk
)
const TaskTypeMigrateRepo TaskType = iota // migrate repository from external or local disk
// Name returns the task type name
func (taskType TaskType) Name() string {
@ -25,9 +22,9 @@ type TaskStatus int
// enumerate all the kinds of task status
const (
TaskStatusQueue TaskStatus = iota // 0 task is queue
TaskStatusQueued TaskStatus = iota // 0 task is queued
TaskStatusRunning // 1 task is running
TaskStatusStopped // 2 task is stopped
TaskStatusStopped // 2 task is stopped (never used)
TaskStatusFailed // 3 task is failed
TaskStatusFinished // 4 task is finished
)