MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / LogData

Method LogData

cmd/cql-proxy/model/task.go:120–139  ·  view source on GitHub ↗

LogData returns task info in string format for log purpose.

()

Source from the content-addressed store, hash-verified

118
119// LogData returns task info in string format for log purpose.
120func (t *Task) LogData() string {
121 if t == nil {
122 return ""
123 }
124
125 d, _ := json.Marshal(gin.H{
126 "id": t.ID,
127 "developer": t.Developer,
128 "account": t.Account,
129 "type": t.Type.String(),
130 "state": t.State.String(),
131 "args": t.Args,
132 "result": t.Result,
133 "created": t.Created,
134 "updated": t.Updated,
135 "finished": t.Finished,
136 })
137
138 return string(d)
139}
140
141// Serialize marshal task object to bytes form.
142func (t *Task) Serialize() (err error) {

Callers 4

NewMethod · 0.95
runMethod · 0.80
runTaskMethod · 0.80
cleanupTaskMethod · 0.80

Calls 2

MarshalMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected