mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: task for importing file from existing filesystem
This commit is contained in:
@@ -13,6 +13,8 @@ const (
|
||||
DecompressTaskType
|
||||
// TransferTaskType 中转任务
|
||||
TransferTaskType
|
||||
// ImportTaskType 导入任务
|
||||
ImportTaskType
|
||||
)
|
||||
|
||||
// 任务状态
|
||||
@@ -41,6 +43,10 @@ const (
|
||||
DownloadingProgress
|
||||
// Transferring 转存中
|
||||
TransferringProgress
|
||||
// ListingProgress 索引中
|
||||
ListingProgress
|
||||
// InsertingProgress 插入中
|
||||
InsertingProgress
|
||||
)
|
||||
|
||||
// Job 任务接口
|
||||
@@ -103,6 +109,8 @@ func GetJobFromModel(task *model.Task) (Job, error) {
|
||||
return NewDecompressTaskFromModel(task)
|
||||
case TransferTaskType:
|
||||
return NewTransferTaskFromModel(task)
|
||||
case ImportTaskType:
|
||||
return NewImportTaskFromModel(task)
|
||||
default:
|
||||
return nil, ErrUnknownTaskType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user