diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-05-11 16:25:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 08:25:46 +0000 |
commit | f6e029e6c7849d4361abf7f1d749b5d528364ac4 (patch) | |
tree | af285dd000dc48e4e94e717cf61a8b2437e99beb /modules/structs | |
parent | 58dfaf3a75a097088376a9c221784b3675ac9c48 (diff) | |
download | gitea-f6e029e6c7849d4361abf7f1d749b5d528364ac4.tar.gz gitea-f6e029e6c7849d4361abf7f1d749b5d528364ac4.zip |
Make repo migration cancelable and fix various bugs (#24605)
Replace #12917
Close #24601
Close #12845
![image](https://github.com/go-gitea/gitea/assets/2114189/39378118-064d-40fb-8396-4579ebf33917)
![image](https://github.com/go-gitea/gitea/assets/2114189/faf37418-191c-46a6-90a8-353141e00e2d)
![image](https://github.com/go-gitea/gitea/assets/2114189/fdc8ee4d-125f-4737-9990-89bcdf9eb388)
![image](https://github.com/go-gitea/gitea/assets/2114189/9a3bd2c2-fe20-4011-81f0-990ed869d139)
---------
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'modules/structs')
-rw-r--r-- | modules/structs/task.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/structs/task.go b/modules/structs/task.go index c73e51b1ab..ed11a33e28 100644 --- a/modules/structs/task.go +++ b/modules/structs/task.go @@ -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 ) |