MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / cleanup

Method cleanup

dgraph/cmd/bulk/loader.go:592–612  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

590}
591
592func (ld *loader) cleanup() {
593 for _, db := range ld.dbs {
594 x.Check(db.Close())
595 }
596 for _, db := range ld.tmpDbs {
597 opts := db.Opts()
598 x.Check(db.Close())
599 x.Check(os.RemoveAll(opts.Dir))
600 }
601 if ld.vectorTmpDb != nil {
602 opts := ld.vectorTmpDb.Opts()
603 x.Check(ld.vectorTmpDb.Close())
604 x.Check(os.RemoveAll(opts.Dir))
605 }
606 if ld.errorLog != nil {
607 if err := ld.errorLog.Close(); err != nil {
608 glog.Warningf("error closing error log: %v", err)
609 }
610 }
611 ld.prog.endSummary()
612}

Callers 1

RunBulkLoaderFunction · 0.45

Calls 5

CheckFunction · 0.92
RemoveAllMethod · 0.80
WarningfMethod · 0.80
endSummaryMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected