Skip to content

Commit

Permalink
Print the Dgraph version when running live or bulk loader. (dgraph-io…
Browse files Browse the repository at this point in the history
…#2736)

* Print the Dgraph version when running live or bulk loader.

Related to e2783d6.

* Refer to Dgraph Bulk Loader in help doc.
  • Loading branch information
danielmai authored and dna2github committed Jul 19, 2019
1 parent 1ffba52 commit b2945c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dgraph/cmd/bulk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func init() {
flag.Int("shufflers", 1,
"Number of shufflers to run concurrently. Increasing this can improve performance, and "+
"must be less than or equal to the number of reduce shards.")
flag.Bool("version", false, "Prints the version of dgraph-bulk-loader.")
flag.Bool("version", false, "Prints the version of Dgraph Bulk Loader.")
flag.BoolP("store_xids", "x", false, "Generate an xid edge for each node.")
flag.StringP("zero", "z", "localhost:5080", "gRPC address for Dgraph zero")
// TODO: Potentially move http server to main.
Expand Down Expand Up @@ -108,8 +108,8 @@ func run() {
ReduceShards: Bulk.Conf.GetInt("reduce_shards"),
}

x.PrintVersion()
if opt.Version {
x.PrintVersion()
os.Exit(0)
}
if opt.RDFDir == "" || opt.SchemaFile == "" {
Expand Down
1 change: 1 addition & 0 deletions dgraph/cmd/live/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ func setup(opts batchMutationOptions, dc *dgo.Dgraph) *loader {
}

func run() error {
x.PrintVersion()
opt = options{
files: Live.Conf.GetString("rdfs"),
schemaFile: Live.Conf.GetString("schema"),
Expand Down

0 comments on commit b2945c9

Please sign in to comment.