Skip to content

Commit a6fade4

Browse files
author
Christian Wygoda
committed
Simplify set up of ProjectionNotificationProcessor
1 parent cbdc33e commit a6fade4

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

driver/sql/projection_notification_processor.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func NewBackgroundProcessor(
3333
queueBuffer int,
3434
logger goengine.Logger,
3535
metrics Metrics,
36-
retryDelay time.Duration,
3736
notificationQueue NotificationQueuer,
3837
) (*ProjectionNotificationProcessor, error) {
3938
if queueProcessors <= 0 {
@@ -49,7 +48,7 @@ func NewBackgroundProcessor(
4948
metrics = NopMetrics
5049
}
5150
if notificationQueue == nil {
52-
notificationQueue = newNotificationQueue(queueBuffer, retryDelay, metrics)
51+
notificationQueue = newNotificationQueue(queueBuffer, 0, metrics)
5352
}
5453

5554
return &ProjectionNotificationProcessor{

driver/sql/projection_notification_processor_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ func TestStartProcessor(t *testing.T) {
7979

8080
bufferSize := 1
8181
queueProcessorsCount := 1
82-
retryDelay := time.Millisecond * 0
83-
processor, err := sql.NewBackgroundProcessor(queueProcessorsCount, bufferSize, nil, nil, retryDelay, nqMock)
82+
processor, err := sql.NewBackgroundProcessor(queueProcessorsCount, bufferSize, nil, nil, nqMock)
8483
require.NoError(t, err)
8584

8685
var wg sync.WaitGroup

driver/sql/projector_aggregate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func NewAggregateProjector(
6161
e.String("projection", projection.Name())
6262
})
6363

64-
processor, err := NewBackgroundProcessor(10, 32, logger, metrics, retryDelay, nil)
64+
processor, err := NewBackgroundProcessor(10, 32, logger, metrics, nil)
6565
if err != nil {
6666
return nil, err
6767
}

0 commit comments

Comments
 (0)