Skip to content

Commit 6b52189

Browse files
committed
Initialize map for start times and fix goimports
1 parent b19792c commit 6b52189

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

extension/prometheus/prometheus.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ func NewMetrics() *Metrics {
5050
},
5151
[]string{"success", "retry"},
5252
),
53+
54+
// notificationStartTimes holds start time for notification queue and processing
55+
notificationStartTimes: make(map[string]time.Time),
5356
}
5457
}
5558

metrics_nop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var NopMetrics Metrics = &nopMetrics{}
55

66
type nopMetrics struct{}
77

8-
func (nm *nopMetrics) ReceivedNotification(isNotification bool) {}
8+
func (nm *nopMetrics) ReceivedNotification(isNotification bool) {}
99
func (nm *nopMetrics) QueueNotification(notification interface{}) {}
1010
func (nm *nopMetrics) StartNotificationProcessing(notification interface{}) {}
1111
func (nm *nopMetrics) FinishNotificationProcessing(notification interface{}, success bool, retry bool) {

test/internal/suite.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package internal
22

33
import (
4-
"github.com/hellofresh/goengine/extension/prometheus"
54
"testing"
65

7-
"github.com/hellofresh/goengine"
8-
logWrapper "github.com/hellofresh/goengine/extension/logrus"
96
"github.com/sirupsen/logrus"
107
"github.com/sirupsen/logrus/hooks/test"
118
"github.com/stretchr/testify/suite"
9+
10+
"github.com/hellofresh/goengine"
11+
logWrapper "github.com/hellofresh/goengine/extension/logrus"
12+
"github.com/hellofresh/goengine/extension/prometheus"
1213
)
1314

1415
// Suite is an extension of github.com/stretchr/testify/suite.Suite

0 commit comments

Comments
 (0)