@@ -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"
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