Skip to content

Commit

Permalink
fix: don't setup extractors in init
Browse files Browse the repository at this point in the history
fixes: #2660
  • Loading branch information
stuartwdouglas committed Sep 12, 2024
1 parent ed06fbe commit a0899c0
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions backend/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,21 +687,14 @@ func (s *Service) Ping(ctx context.Context, req *connect.Request[ftlv1.PingReque
return connect.NewResponse(&ftlv1.PingResponse{}), nil
}

// Check if all required deployments are active.
modules, err := s.dal.GetActiveDeployments(ctx)
if err != nil {
return nil, err
}
//It's not actually ready until it is in the routes table
routes := s.routes.Load()
var missing []string
nextModule:
for _, module := range s.config.WaitFor {
for _, m := range modules {
replicas, ok := m.Replicas.Get()
if ok && replicas > 0 && m.Module == module {
continue nextModule
}
route, ok := routes[module]
if !ok || len(route) == 0 {
missing = append(missing, module)
}
missing = append(missing, module)
}
if len(missing) == 0 {
return connect.NewResponse(&ftlv1.PingResponse{}), nil
Expand Down

0 comments on commit a0899c0

Please sign in to comment.