diff --git a/Gopkg.lock b/Gopkg.lock index c5ac388..7b9030e 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -26,12 +26,12 @@ version = "v1.0.4" [[projects]] - branch = "master" - digest = "1:6745d03b8fe80de8662ec3f838a28731cf3b7ed85cc6959c1f765bab711c322d" + digest = "1:bde6e5a9cb11741ce5dd34851590bbae178ae232a3bc605b459154fa03dfa183" name = "github.com/RTradeLtd/config" packages = ["."] pruneopts = "T" - revision = "8a4af7437b526a027348bdbc2530f93bf5efd424" + revision = "4140b3d6ec5751c110f0660a52b1b3209b95ddd6" + version = "v2.0.3" [[projects]] digest = "1:a05f942064ec8f597114935de279d334456cb5540a3aec871c51351b09ee4cdc" diff --git a/Gopkg.toml b/Gopkg.toml index b1df96b..4596f05 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -21,7 +21,7 @@ ignored = ["github.com/gen2brain/go-fitz"] [[constraint]] name = "github.com/RTradeLtd/config" - branch = "master" + version = "~v2.0.0" ############### # THIRD PARTY # diff --git a/cmd/temporal-lens/main.go b/cmd/temporal-lens/main.go index 31ca867..66839d1 100644 --- a/cmd/temporal-lens/main.go +++ b/cmd/temporal-lens/main.go @@ -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" @@ -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, @@ -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) }