Skip to content

Find, verify, and analyze leaked credentials

Enumeration jobs should not consume concurrency slots (#3952)

Dustin Decker9a483c9169de
diff --git a/pkg/sources/source_manager.go b/pkg/sources/source_manager.go
index 2e03be1d8..48f369ec3 100644
--- a/pkg/sources/source_manager.go
+++ b/pkg/sources/source_manager.go
@@ -181,14 +181,8 @@ func (s *SourceManager) Enumerate(ctx context.Context, sourceName string, source
}
// Create a JobProgress object for tracking progress.
- sem := s.sem
ctx, cancel := context.WithCancelCause(ctx)
progress := NewJobProgress(jobID, sourceID, sourceName, WithHooks(s.hooks...), WithCancel(cancel))
- if err := sem.Acquire(ctx, 1); err != nil {
- // Context cancelled.
- progress.ReportError(Fatal{err})
- return progress.Ref(), Fatal{err}
- }
// Wrap the passed in reporter so we update the progress information.
reporter = baseUnitReporter{
@@ -200,7 +194,6 @@ func (s *SourceManager) Enumerate(ctx context.Context, sourceName string, source
go func() {
// Call Finish after the semaphore has been released.
defer progress.Finish()
- defer sem.Release(1)
defer s.wg.Done()
ctx := context.WithValues(ctx,
"source_manager_worker_id", common.RandomID(5),