summaryrefslogtreecommitdiff
path: root/plugins/amqp/amqpjobs/listener.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/amqp/amqpjobs/listener.go')
-rw-r--r--plugins/amqp/amqpjobs/listener.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/plugins/amqp/amqpjobs/listener.go b/plugins/amqp/amqpjobs/listener.go
deleted file mode 100644
index 75c61cad..00000000
--- a/plugins/amqp/amqpjobs/listener.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package amqpjobs
-
-import amqp "github.com/rabbitmq/amqp091-go"
-
-func (c *consumer) listener(deliv <-chan amqp.Delivery) {
- go func() {
- for { //nolint:gosimple
- select {
- case msg, ok := <-deliv:
- if !ok {
- c.log.Info("delivery channel closed, leaving the rabbit listener")
- return
- }
-
- d, err := c.fromDelivery(msg)
- if err != nil {
- c.log.Error("amqp delivery convert", "error", err)
- continue
- }
- // insert job into the main priority queue
- c.pq.Insert(d)
- }
- }
- }()
-}