Skip to content

Commit a067b1d

Browse files
author
potsables
authored
Merge pull request #23 from RTradeLtd/fix/v2#runserver
TEM-243: v2 server launch
2 parents 4a712f9 + 9c71f4b commit a067b1d

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

Gopkg.lock

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

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ignored = ["github.com/gen2brain/go-fitz"]
2121

2222
[[constraint]]
2323
name = "github.com/RTradeLtd/config"
24-
branch = "master"
24+
version = "~v2.0.0"
2525

2626
###############
2727
# THIRD PARTY #

cmd/temporal-lens/main.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import (
1111

1212
lens "github.com/RTradeLtd/Lens"
1313
"github.com/RTradeLtd/Lens/analyzer/images"
14+
"github.com/RTradeLtd/Lens/engine"
15+
"github.com/RTradeLtd/Lens/engine/queue"
1416
"github.com/RTradeLtd/Lens/logs"
1517
"github.com/RTradeLtd/Lens/server"
1618
"github.com/RTradeLtd/cmd"
@@ -30,8 +32,6 @@ var (
3032
"path to Temporal configuration")
3133
modelPath = flag.String("models", "/tmp",
3234
"path to TensorFlow models")
33-
dsPath = flag.String("datastore", "/data/lens/badgerds-lens",
34-
"path to Badger datastore")
3535
logPath = flag.String("logpath", "",
3636
"path to write logs to - leave blank for stdout")
3737
devMode = flag.Bool("dev", false,
@@ -68,7 +68,15 @@ var commands = map[string]cmd.Cmd{
6868

6969
// create lens v2 service
7070
l.Info("instantiating Lens V2")
71-
srv, err := lens.NewV2(lens.V2Options{}, manager, tf, l)
71+
srv, err := lens.NewV2(lens.V2Options{
72+
Engine: engine.Opts{
73+
StorePath: cfg.Lens.Options.Engine.StorePath,
74+
Queue: queue.Options{
75+
Rate: time.Duration(cfg.Lens.Options.Engine.Queue.Rate) * time.Second,
76+
BatchSize: cfg.Lens.Options.Engine.Queue.Batch,
77+
},
78+
},
79+
}, manager, tf, l)
7280
if err != nil {
7381
l.Fatalw("failed to instantiate Lens V2", "error", err)
7482
}

0 commit comments

Comments
 (0)