MCPcopy Create free account
hub / github.com/flant/shell-operator / NewTask

Function NewTask

pkg/task/task.go:58–68  ·  view source on GitHub ↗
(taskType TaskType)

Source from the content-addressed store, hash-verified

56}
57
58func NewTask(taskType TaskType) *BaseTask {
59 taskId := uuid.Must(uuid.NewV4()).String()
60 return &BaseTask{
61 Id: taskId,
62 FailureCount: 0,
63 Type: taskType,
64 LogLabels: map[string]string{pkg.LogKeyTaskDotID: taskId},
65 Props: make(map[string]interface{}),
66 compactionID: taskId,
67 }
68}
69
70func (t *BaseTask) deepCopy() *BaseTask {
71 t.lock.RLock()

Calls 1

StringMethod · 0.45