File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ func Init() {
38
38
return
39
39
}
40
40
41
+ initQueue (setting .Indexer .UpdateQueueLength )
42
+
41
43
ctx , cancel := context .WithCancel (context .Background ())
42
44
43
45
graceful .GetManager ().RunAtTerminate (ctx , func () {
Original file line number Diff line number Diff line change @@ -21,8 +21,11 @@ type repoIndexerOperation struct {
21
21
22
22
var repoIndexerOperationQueue chan repoIndexerOperation
23
23
24
+ func initQueue (queueLength int ) {
25
+ repoIndexerOperationQueue = make (chan repoIndexerOperation , queueLength )
26
+ }
27
+
24
28
func processRepoIndexerOperationQueue (indexer Indexer ) {
25
- repoIndexerOperationQueue = make (chan repoIndexerOperation , setting .Indexer .UpdateQueueLength )
26
29
for {
27
30
select {
28
31
case op := <- repoIndexerOperationQueue :
You can’t perform that action at this time.
0 commit comments