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() {
3838 return
3939 }
4040
41+ initQueue (setting .Indexer .UpdateQueueLength )
42+
4143 ctx , cancel := context .WithCancel (context .Background ())
4244
4345 graceful .GetManager ().RunAtTerminate (ctx , func () {
Original file line number Diff line number Diff line change @@ -21,8 +21,11 @@ type repoIndexerOperation struct {
2121
2222var repoIndexerOperationQueue chan repoIndexerOperation
2323
24+ func initQueue (queueLength int ) {
25+ repoIndexerOperationQueue = make (chan repoIndexerOperation , queueLength )
26+ }
27+
2428func processRepoIndexerOperationQueue (indexer Indexer ) {
25- repoIndexerOperationQueue = make (chan repoIndexerOperation , setting .Indexer .UpdateQueueLength )
2629 for {
2730 select {
2831 case op := <- repoIndexerOperationQueue :
You can’t perform that action at this time.
0 commit comments