Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek committed Dec 3, 2024
1 parent 6cc96d4 commit 1c74db0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions v2/cmd/asoctl/pkg/importresources/resource_importer.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ func (ri *ResourceImporter) startDeduplicator(
uniqueResources := make(chan ImportableResource)

waitgroup.Go(func() {
running := true
for running {
run:
for {
// Dequeue from our internal buffer if needed
if current == nil && len(queue) > 0 {
current = queue[0]
Expand All @@ -170,7 +170,7 @@ func (ri *ResourceImporter) startDeduplicator(
case rsrc, ok := <-resources:
if !ok {
// Channel closed
running = false
break run
} else if seen.Contains(rsrc.ID()) {
// We've already seen this resource (we've already queued it for import)
// So remove it from our count of work to be done
Expand Down Expand Up @@ -235,7 +235,6 @@ func (ri *ResourceImporter) startWorkers(
// pending is a source of resources to import.
// completed is where we send the result of a successful import.
// failed is where we send the error from a failed import.
// done is a channel we signal when we're finished.
func (ri *ResourceImporter) importWorker(
ctx context.Context,
pending <-chan ImportableResource,
Expand Down

0 comments on commit 1c74db0

Please sign in to comment.