MCPcopy
hub / github.com/dgraph-io/dgraph / newTaskMeta

Function newTaskMeta

worker/queue.go:335–338  ·  view source on GitHub ↗
(kind TaskKind, status TaskStatus)

Source from the content-addressed store, hash-verified

333type TaskMeta uint64
334
335func newTaskMeta(kind TaskKind, status TaskStatus) TaskMeta {
336 now := time.Now().UTC().Unix()
337 return TaskMeta(now)<<32 | TaskMeta(kind)<<16 | TaskMeta(status)
338}
339
340// Timestamp returns the timestamp of the last status change of the task.
341func (t TaskMeta) Timestamp() time.Time {

Callers 3

InitTasksFunction · 0.85
enqueueMethod · 0.85
runMethod · 0.85

Calls 1

TaskMetaTypeAlias · 0.85

Tested by

no test coverage detected