Skip to content

Commit 414cf68

Browse files
author
potsables
committed
cmd/temporal-lens: remove type conversions
1 parent d629aea commit 414cf68

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

Gopkg.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/temporal-lens/main.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"log"
77
"os"
88
"os/signal"
9-
"strconv"
109
"syscall"
1110
"time"
1211

@@ -67,23 +66,14 @@ var commands = map[string]cmd.Cmd{
6766
l.Fatalw("failed to instantiate image analyzer", "error", err)
6867
}
6968

70-
rateInt, err := strconv.ParseInt(cfg.Lens.Options.Queue.Rate, 10, 64)
71-
if err != nil {
72-
l.Fatalw("failed to parse rate to integer", "error", err)
73-
}
74-
batchInt, err := strconv.ParseInt(cfg.Lens.Options.Queue.Batch, 10, 64)
75-
if err != nil {
76-
l.Fatalw("failed to parse batch to integer", "error", err)
77-
}
78-
7969
// create lens v2 service
8070
l.Info("instantiating Lens V2")
8171
srv, err := lens.NewV2(lens.V2Options{
8272
Engine: engine.Opts{
8373
StorePath: cfg.Lens.Options.Engine.StorePath,
8474
Queue: queue.Options{
85-
Rate: time.Duration(rateInt) * time.Second,
86-
BatchSize: int(batchInt),
75+
Rate: time.Duration(cfg.Lens.Options.Engine.Queue.Rate) * time.Second,
76+
BatchSize: cfg.Lens.Options.Engine.Queue.Batch,
8777
},
8878
},
8979
}, manager, tf, l)

0 commit comments

Comments
 (0)