Skip to content

Commit

Permalink
updated workflow loading
Browse files Browse the repository at this point in the history
  • Loading branch information
awitas committed Oct 10, 2022
1 parent 72f44cb commit c22f7e3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion service/endpoint/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ func (s *Service) initModelHandler(datastores map[string]*datastore.Service, poo
var lock sync.Mutex
for i := range s.config.ModelList.Models {
go func(model *config.Model) {
waitGroup.Done()
defer waitGroup.Done()
if e := s.initModel(datastores, pool, mux, model, &lock); e != nil {
lock.Lock()
err = e
lock.Unlock()
}
}(s.config.ModelList.Models[i])
}
Expand Down

0 comments on commit c22f7e3

Please sign in to comment.