mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-10 18:53:58 +09:00
Queue & Setting: Add worker pool implementation
This commit is contained in:
@ -22,7 +22,7 @@ func TestBatchedChannelQueue(t *testing.T) {
|
||||
|
||||
nilFn := func(_ context.Context, _ func()) {}
|
||||
|
||||
queue, err := NewBatchedChannelQueue(handle, BatchedChannelQueueConfiguration{QueueLength: 20, BatchLength: 2}, &testData{})
|
||||
queue, err := NewBatchedChannelQueue(handle, BatchedChannelQueueConfiguration{QueueLength: 20, BatchLength: 2, Workers: 1}, &testData{})
|
||||
assert.NoError(t, err)
|
||||
|
||||
go queue.Run(nilFn, nilFn)
|
||||
|
Reference in New Issue
Block a user