lib/model: Add progressEmitter to supervisor (model) (#5510)

This commit is contained in:
Simon Frei 2019-02-05 19:02:36 +01:00 committed by Audrius Butkevicius
parent af4fb97538
commit 5df8219bcb

View File

@ -169,7 +169,7 @@ func NewModel(cfg *config.Wrapper, id protocol.DeviceID, clientName, clientVersi
pmut: sync.NewRWMutex(), pmut: sync.NewRWMutex(),
} }
if cfg.Options().ProgressUpdateIntervalS > -1 { if cfg.Options().ProgressUpdateIntervalS > -1 {
go m.progressEmitter.Serve() m.Add(m.progressEmitter)
} }
scanLimiter.setCapacity(cfg.Options().MaxConcurrentScans) scanLimiter.setCapacity(cfg.Options().MaxConcurrentScans)
cfg.Subscribe(m) cfg.Subscribe(m)