Skip to content

Commit af50b32

Browse files
committed
chore: clean up
1 parent 64bb247 commit af50b32

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

cmd/node/main.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ func run(ctx context.Context, cancel func(), conf *config.Config, stat stats.Sta
8686
}
8787

8888
nodeConfig := node.Config{
89-
NodeID: uint32(nodeID),
90-
ClusterSize: uint32(conf.GetInt("clusterSize", 1)),
91-
TotalHashRanges: uint32(conf.GetInt("totalHashRanges", node.DefaultTotalHashRanges)),
92-
MaxFilesToList: conf.GetInt64("maxFilesToList", node.DefaultMaxFilesToList),
93-
SnapshotInterval: conf.GetDuration("snapshotInterval", 0, time.Nanosecond), // node.DefaultSnapshotInterval will be used
94-
Addresses: strings.Split(nodeAddresses, ","),
89+
NodeID: uint32(nodeID),
90+
ClusterSize: uint32(conf.GetInt("clusterSize", 1)),
91+
TotalHashRanges: uint32(conf.GetInt("totalHashRanges", node.DefaultTotalHashRanges)),
92+
MaxFilesToList: conf.GetInt64("maxFilesToList", node.DefaultMaxFilesToList),
93+
SnapshotInterval: conf.GetDuration("snapshotInterval", 0, time.Nanosecond), // node.DefaultSnapshotInterval will be used
94+
GarbageCollectionInterval: conf.GetDuration("gcInterval", 0, time.Nanosecond), // node.DefaultGarbageCollectionInterval will be used
95+
Addresses: strings.Split(nodeAddresses, ","),
9596
}
9697

9798
port := conf.GetInt("port", 50051)
@@ -100,8 +101,6 @@ func run(ctx context.Context, cancel func(), conf *config.Config, stat stats.Sta
100101
logger.NewIntField("nodeId", int64(nodeConfig.NodeID)),
101102
logger.NewIntField("clusterSize", int64(nodeConfig.ClusterSize)),
102103
logger.NewIntField("totalHashRanges", int64(nodeConfig.TotalHashRanges)),
103-
logger.NewDurationField("snapshotInterval", nodeConfig.SnapshotInterval),
104-
logger.NewDurationField("gcInterval", nodeConfig.GarbageCollectionInterval),
105104
logger.NewStringField("nodeAddresses", fmt.Sprintf("%+v", nodeConfig.Addresses)),
106105
logger.NewIntField("noOfAddresses", int64(len(nodeConfig.Addresses))),
107106
)

0 commit comments

Comments
 (0)