Fixed mqtrigger scaling issue (#2986)

* Fixed mqtrigger scaling issue

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Resolve review comments

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Set goreleaser version to v1
Remove armv7 references from goreleaser file

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-08-09 11:58:44 +05:30
committed by GitHub
parent 1732d9f4b0
commit 90d781ca2d
5 changed files with 58 additions and 133 deletions
@@ -74,6 +74,8 @@ func NewMqtConsumerGroupHandler(version sarama.KafkaVersion,
// Setup implemented to satisfy the sarama.ConsumerGroupHandler interface
func (ch MqtConsumerGroupHandler) Setup(session sarama.ConsumerGroupSession) error {
mqtrigger.SetTriggerStatus(ch.trigger.ObjectMeta.Name, ch.trigger.ObjectMeta.Namespace)
mqtrigger.IncreaseInprocessCount()
ch.logger.With(
zap.String("trigger", ch.trigger.ObjectMeta.Name),
zap.String("topic", ch.trigger.Spec.Topic),
@@ -88,6 +90,8 @@ func (ch MqtConsumerGroupHandler) Setup(session sarama.ConsumerGroupSession) err
// Cleanup implemented to satisfy the sarama.ConsumerGroupHandler interface
func (ch MqtConsumerGroupHandler) Cleanup(session sarama.ConsumerGroupSession) error {
mqtrigger.ResetTriggerStatus(ch.trigger.ObjectMeta.Name, ch.trigger.ObjectMeta.Namespace)
mqtrigger.DecreaseInprocessCount()
ch.logger.With(
zap.String("trigger", ch.trigger.ObjectMeta.Name),
zap.String("topic", ch.trigger.Spec.Topic),