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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user