.gitignore
This commit is contained in:
27
rag/enio/base_task.go
Normal file
27
rag/enio/base_task.go
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package enio
|
||||||
|
|
||||||
|
import (
|
||||||
|
"gitee.com/red-future---jilin-g/common/beans"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BaseTask 任务基类
|
||||||
|
type BaseTask struct {
|
||||||
|
beans.MongoBaseDO `bson:",inline"`
|
||||||
|
// 任务信息
|
||||||
|
TaskType string `bson:"taskType" json:"taskType"`
|
||||||
|
Status string `bson:"status" json:"status"`
|
||||||
|
Priority int `bson:"priority,omitempty" json:"priority,omitempty"`
|
||||||
|
// 进度
|
||||||
|
TotalItems int64 `bson:"totalItems" json:"totalItems"`
|
||||||
|
ProcessedItems int64 `bson:"processedItems" json:"processedItems"`
|
||||||
|
Progress float64 `bson:"progress" json:"progress"`
|
||||||
|
// 结果
|
||||||
|
StartTime int64 `bson:"startTime" json:"startTime"`
|
||||||
|
EndTime int64 `bson:"endTime,omitempty" json:"endTime,omitempty"`
|
||||||
|
Duration int64 `bson:"duration,omitempty" json:"duration,omitempty"`
|
||||||
|
SuccessCount int64 `bson:"successCount" json:"successCount"`
|
||||||
|
FailCount int64 `bson:"failCount" json:"failCount"`
|
||||||
|
ErrorMsg string `bson:"errorMsg,omitempty" json:"errorMsg,omitempty"`
|
||||||
|
// 其他
|
||||||
|
Executor string `bson:"executor,omitempty" json:"executor,omitempty"`
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user