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

Method run

worker/queue.go:308–325  ·  view source on GitHub ↗

run starts a task and blocks till it completes.

()

Source from the content-addressed store, hash-verified

306
307// run starts a task and blocks till it completes.
308func (t *taskRequest) run() error {
309 switch req := t.req.(type) {
310 case *pb.BackupRequest:
311 if err := ProcessBackupRequest(context.Background(), req); err != nil {
312 return err
313 }
314 case *pb.ExportRequest:
315 files, err := ExportOverNetwork(context.Background(), req)
316 if err != nil {
317 return err
318 }
319 glog.Infof("task %#x: exported files: %v", t.id, files)
320 default:
321 glog.Errorf(
322 "task %#x: received request of unknown type (%T)", t.id, reflect.TypeOf(t.req))
323 }
324 return nil
325}
326
327// TaskMeta stores a timestamp, a TaskKind and a Status.
328//

Callers

nothing calls this directly

Calls 5

ProcessBackupRequestFunction · 0.85
ExportOverNetworkFunction · 0.85
InfofMethod · 0.80
TypeOfMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected