Skip to content

Commit

Permalink
count up after acquire
Browse files Browse the repository at this point in the history
  • Loading branch information
whywaita committed Jan 24, 2022
1 parent 7f8231b commit 8b2a712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/runner/runner_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ func (m *Manager) removeRunners(ctx context.Context, t datastore.Target) error {
if err := sem.Acquire(ctx, 1); err != nil {
return fmt.Errorf("failed to Acquire: %w", err)
}
ConcurrencyDeleting++

eg.Go(func() error {
defer func() {
sem.Release(1)
ConcurrencyDeleting--
}()

ConcurrencyDeleting++
if err := m.removeRunner(ctx, t, runner, ghRunners); err != nil {
logger.Logf(false, "failed to delete runner: %+v", err)
}
Expand Down

0 comments on commit 8b2a712

Please sign in to comment.