Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd62d704

Browse files
committed
make lint
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent7f60c0f commitd62d704

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

‎coderd/notifications/manager_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/coder/serpent"
1110
"github.com/google/uuid"
1211
"github.com/stretchr/testify/assert"
1312
"github.com/stretchr/testify/require"
1413
"golang.org/x/xerrors"
1514

15+
"github.com/coder/serpent"
16+
1617
"cdr.dev/slog"
1718
"cdr.dev/slog/sloggers/slogtest"
1819

‎coderd/notifications/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func NewMetrics(reg prometheus.Registerer) *Metrics {
4444
// Aggregating on LabelTemplateID as well would cause a cardinality explosion.
4545
QueuedSeconds:promauto.With(reg).NewHistogramVec(prometheus.HistogramOpts{Name:"queued_seconds",Namespace:ns,Subsystem:subsystem,
4646
Buckets: []float64{0.1,1,5,15,30,60,120,300,600,3600,86400},
47-
Help:"Thedifference between a notification being enqueued in the store and retrieved for processing "+
47+
Help:"Thetime elapsed between a notification being enqueued in the store and retrieved for processing "+
4848
"(measures the latency of the notifications system). This should generally be within CODER_NOTIFICATIONS_FETCH_INTERVAL "+
4949
"seconds; higher values for a sustained period indicates delayed processing and CODER_NOTIFICATIONS_LEASE_COUNT "+
5050
"can be increased to accommodate this.",

‎coderd/notifications/metrics_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,17 @@ import (
66
"testing"
77
"time"
88

9-
"cdr.dev/slog"
10-
"cdr.dev/slog/sloggers/slogtest"
11-
"github.com/coder/serpent"
129
"github.com/prometheus/client_golang/prometheus"
1310
promtest"github.com/prometheus/client_golang/prometheus/testutil"
1411
dto"github.com/prometheus/client_model/go"
1512
"github.com/prometheus/common/model"
1613
"github.com/stretchr/testify/assert"
1714
"github.com/stretchr/testify/require"
1815

16+
"cdr.dev/slog"
17+
"cdr.dev/slog/sloggers/slogtest"
18+
"github.com/coder/serpent"
19+
1920
"github.com/coder/coder/v2/coderd/database"
2021
"github.com/coder/coder/v2/coderd/database/dbmem"
2122
"github.com/coder/coder/v2/coderd/database/dbtestutil"

‎coderd/notifications/notifications_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ import (
1414
"testing"
1515
"time"
1616

17-
"cdr.dev/slog"
18-
"cdr.dev/slog/sloggers/slogtest"
19-
"github.com/coder/serpent"
2017
"github.com/google/uuid"
2118
smtpmock"github.com/mocktools/go-smtp-mock/v2"
2219
"github.com/stretchr/testify/assert"
2320
"github.com/stretchr/testify/require"
2421
"go.uber.org/goleak"
2522
"golang.org/x/xerrors"
2623

24+
"cdr.dev/slog"
25+
"cdr.dev/slog/sloggers/slogtest"
26+
"github.com/coder/serpent"
27+
2728
"github.com/coder/coder/v2/coderd/database"
2829
"github.com/coder/coder/v2/coderd/database/dbgen"
2930
"github.com/coder/coder/v2/coderd/database/dbmem"

‎coderd/notifications/notifier.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ func (n *notifier) newSuccessfulDispatch(msg database.AcquireNotificationMessage
257257
}
258258
}
259259

260+
// revive:disable-next-line:flag-parameter // Not used for control flow, rather just choosing which metric to increment.
260261
func (n*notifier)newFailedDispatch(msg database.AcquireNotificationMessagesRow,errerror,retryablebool)dispatchResult {
261262
metric:=n.metrics.PermFailureCount
262263

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp