feat: add worker distributor and model registry
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -62,12 +62,13 @@ func (s *Scheduler) Execute(ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (s *Scheduler) acquireLeader(ctx context.Context) (bool, error) {
|
||||
db, err := s.db.Acquire(ctx)
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return false, nil
|
||||
default:
|
||||
db, err := s.db.Acquire(ctx)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("failed to acquire db connection: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user