Skip to content

Commit

Permalink
Merge pull request #23 from RTradeLtd/fix/v2#runserver
Browse files Browse the repository at this point in the history
TEM-243: v2 server launch
  • Loading branch information
potsables authored Feb 24, 2019
2 parents 4a712f9 + 9c71f4b commit a067b1d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ignored = ["github.com/gen2brain/go-fitz"]

[[constraint]]
name = "github.com/RTradeLtd/config"
branch = "master"
version = "~v2.0.0"

###############
# THIRD PARTY #
Expand Down
14 changes: 11 additions & 3 deletions cmd/temporal-lens/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import (

lens "github.com/RTradeLtd/Lens"
"github.com/RTradeLtd/Lens/analyzer/images"
"github.com/RTradeLtd/Lens/engine"
"github.com/RTradeLtd/Lens/engine/queue"
"github.com/RTradeLtd/Lens/logs"
"github.com/RTradeLtd/Lens/server"
"github.com/RTradeLtd/cmd"
Expand All @@ -30,8 +32,6 @@ var (
"path to Temporal configuration")
modelPath = flag.String("models", "/tmp",
"path to TensorFlow models")
dsPath = flag.String("datastore", "/data/lens/badgerds-lens",
"path to Badger datastore")
logPath = flag.String("logpath", "",
"path to write logs to - leave blank for stdout")
devMode = flag.Bool("dev", false,
Expand Down Expand Up @@ -68,7 +68,15 @@ var commands = map[string]cmd.Cmd{

// create lens v2 service
l.Info("instantiating Lens V2")
srv, err := lens.NewV2(lens.V2Options{}, manager, tf, l)
srv, err := lens.NewV2(lens.V2Options{
Engine: engine.Opts{
StorePath: cfg.Lens.Options.Engine.StorePath,
Queue: queue.Options{
Rate: time.Duration(cfg.Lens.Options.Engine.Queue.Rate) * time.Second,
BatchSize: cfg.Lens.Options.Engine.Queue.Batch,
},
},
}, manager, tf, l)
if err != nil {
l.Fatalw("failed to instantiate Lens V2", "error", err)
}
Expand Down

0 comments on commit a067b1d

Please sign in to comment.