From c3755fc13bf866c32851508a1061f81a49073eac Mon Sep 17 00:00:00 2001 From: Pawel Paszki Date: Tue, 18 Apr 2023 11:16:24 +0100 Subject: [PATCH] feat: add extra time that prevents from instantly suspending out of quota kafkas --- internal/kafka/internal/workers/kafka_mgrs/kafkas_mgr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/kafka/internal/workers/kafka_mgrs/kafkas_mgr.go b/internal/kafka/internal/workers/kafka_mgrs/kafkas_mgr.go index cd9ee9cef..d66cf0187 100644 --- a/internal/kafka/internal/workers/kafka_mgrs/kafkas_mgr.go +++ b/internal/kafka/internal/workers/kafka_mgrs/kafkas_mgr.go @@ -440,7 +440,7 @@ func (k *KafkaManager) updateExpiresAtBasedOnQuotaEntitlement(kafka *dbapi.Kafka } // set expires_at to now + grace period days - expiresAtTime := time.Now().AddDate(0, 0, billingModel.GracePeriodDays) + expiresAtTime := time.Now().AddDate(0, 0, billingModel.GracePeriodDays).Add(time.Hour * 12) logger.Logger.Infof("quota entitlement for kafka instance %q is no longer active, updating expires_at to %q", kafka.ID, expiresAtTime.Format(time.RFC1123Z)) return k.updateKafkaExpirationDate(kafka, &expiresAtTime) }