forked from NYANDEV/forgejo
Make repo migration cancelable and fix various bugs (#24605)
Replace #12917 Close #24601 Close #12845     --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
parent
58dfaf3a75
commit
f6e029e6c7
10 changed files with 128 additions and 106 deletions
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue