Skip to content

Commit

Permalink
tolerate nil for declarative workers
Browse files Browse the repository at this point in the history
  • Loading branch information
svenwltr committed Dec 19, 2024
1 parent 663d3be commit 3ce71e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/runutil/dig.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func RunProvidedWorkers(ctx context.Context, c *dig.Container) error {
return c.Invoke(func(in WorkerGroup) error {
workers := []Worker{}
for _, c := range in.All {
if c == nil {
continue
}

for _, w := range c.Workers() {
workers = append(workers,
NamedWorkerFromType(w, c),
Expand Down

0 comments on commit 3ce71e0

Please sign in to comment.