Skip to content

Commit

Permalink
🐛 Fix workq concurrency map (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
tosone authored May 5, 2024
1 parent 04b3c3f commit 0c1289a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/modules/workq/inmemory/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ package inmemory

import (
"context"
"time"

"github.com/rs/zerolog/log"

Expand All @@ -31,10 +30,11 @@ var packs = make(map[enums.Daemon]chan *models.WorkQueue, 10)

// NewWorkQueueConsumer ...
func NewWorkQueueConsumer(config configs.Configuration, topicHandlers map[enums.Daemon]definition.Consumer) error {
for topic, c := range topicHandlers {
for topic := range topicHandlers {
packs[topic] = make(chan *models.WorkQueue, config.WorkQueue.Inmemory.Concurrency)
}
for topic, c := range topicHandlers {
go func(consumer definition.Consumer, topic enums.Daemon) {
time.Sleep(time.Second * 3)
handler := &consumerHandler{
processingSemaphore: make(chan struct{}, consumer.Concurrency),
consumer: consumer,
Expand Down

0 comments on commit 0c1289a

Please sign in to comment.