Skip to content

Commit

Permalink
tidy up function name
Browse files Browse the repository at this point in the history
  • Loading branch information
sakoush committed Sep 30, 2024
1 parent 16ac4fd commit d9bdd7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions operator/scheduler/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *SchedulerClient) startEventHanders(namespace string, conn *grpc.ClientC
triggered := atomic.Bool{}
triggered.Store(false)
ch := make(chan struct{})
tryTriggerFn := func() {
tryTrigger := func() {
swapped := triggered.CompareAndSwap(false, true) // make sure we run only once
if swapped {
ch <- struct{}{}
Expand All @@ -101,7 +101,7 @@ func (s *SchedulerClient) startEventHanders(namespace string, conn *grpc.ClientC
} else {
s.logger.Info("Subscribe ended for model events", "namespace", namespace)
}
tryTriggerFn()
tryTrigger()
}
}()
go func() {
Expand All @@ -112,7 +112,7 @@ func (s *SchedulerClient) startEventHanders(namespace string, conn *grpc.ClientC
} else {
s.logger.Info("Subscribe ended for server events", "namespace", namespace)
}
tryTriggerFn()
tryTrigger()
}
}()
go func() {
Expand All @@ -123,7 +123,7 @@ func (s *SchedulerClient) startEventHanders(namespace string, conn *grpc.ClientC
} else {
s.logger.Info("Subscribe ended for pipeline events", "namespace", namespace)
}
tryTriggerFn()
tryTrigger()
}
}()
go func() {
Expand All @@ -134,7 +134,7 @@ func (s *SchedulerClient) startEventHanders(namespace string, conn *grpc.ClientC
} else {
s.logger.Info("Subscribe ended for experiment events", "namespace", namespace)
}
tryTriggerFn()
tryTrigger()
}
}()

Expand Down

0 comments on commit d9bdd7b

Please sign in to comment.