Skip to content

Commit

Permalink
Merge pull request #226 from rebuy-de/nil-worker
Browse files Browse the repository at this point in the history
tolerate nil for declarative workers
  • Loading branch information
svenwltr authored Dec 23, 2024
2 parents 3154a7f + 3ce71e0 commit b794980
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 b794980

Please sign in to comment.