@@ -83,12 +83,6 @@ const (
83
83
ReCaptcha = "recaptcha"
84
84
)
85
85
86
- // enumerates all the indexer queue types
87
- const (
88
- LevelQueueType = "levelqueue"
89
- ChannelQueueType = "channel"
90
- )
91
-
92
86
// settings
93
87
var (
94
88
// AppVer settings
@@ -185,25 +179,6 @@ var (
185
179
DBConnectRetries int
186
180
DBConnectBackoff time.Duration
187
181
188
- // Indexer settings
189
- Indexer = struct {
190
- IssueType string
191
- IssuePath string
192
- RepoIndexerEnabled bool
193
- RepoPath string
194
- UpdateQueueLength int
195
- MaxIndexerFileSize int64
196
- IssueIndexerQueueType string
197
- IssueIndexerQueueDir string
198
- IssueIndexerQueueBatchNumber int
199
- }{
200
- IssueType : "bleve" ,
201
- IssuePath : "indexers/issues.bleve" ,
202
- IssueIndexerQueueType : LevelQueueType ,
203
- IssueIndexerQueueDir : "indexers/issues.queue" ,
204
- IssueIndexerQueueBatchNumber : 20 ,
205
- }
206
-
207
182
// Repository settings
208
183
Repository = struct {
209
184
AnsiCharset string
@@ -1232,22 +1207,6 @@ func NewContext() {
1232
1207
// Explicitly disable credential helper, otherwise Git credentials might leak
1233
1208
git .GlobalCommandArgs = append (git .GlobalCommandArgs , "-c" , "credential.helper=" )
1234
1209
}
1235
-
1236
- sec = Cfg .Section ("indexer" )
1237
- Indexer .IssuePath = sec .Key ("ISSUE_INDEXER_PATH" ).MustString (path .Join (AppDataPath , "indexers/issues.bleve" ))
1238
- if ! filepath .IsAbs (Indexer .IssuePath ) {
1239
- Indexer .IssuePath = path .Join (AppWorkPath , Indexer .IssuePath )
1240
- }
1241
- Indexer .RepoIndexerEnabled = sec .Key ("REPO_INDEXER_ENABLED" ).MustBool (false )
1242
- Indexer .RepoPath = sec .Key ("REPO_INDEXER_PATH" ).MustString (path .Join (AppDataPath , "indexers/repos.bleve" ))
1243
- if ! filepath .IsAbs (Indexer .RepoPath ) {
1244
- Indexer .RepoPath = path .Join (AppWorkPath , Indexer .RepoPath )
1245
- }
1246
- Indexer .UpdateQueueLength = sec .Key ("UPDATE_BUFFER_LEN" ).MustInt (20 )
1247
- Indexer .MaxIndexerFileSize = sec .Key ("MAX_FILE_SIZE" ).MustInt64 (1024 * 1024 )
1248
- Indexer .IssueIndexerQueueType = sec .Key ("ISSUE_INDEXER_QUEUE_TYPE" ).MustString (LevelQueueType )
1249
- Indexer .IssueIndexerQueueDir = sec .Key ("ISSUE_INDEXER_QUEUE_DIR" ).MustString (path .Join (AppDataPath , "indexers/issues.queue" ))
1250
- Indexer .IssueIndexerQueueBatchNumber = sec .Key ("ISSUE_INDEXER_QUEUE_BATCH_NUMBER" ).MustInt (20 )
1251
1210
}
1252
1211
1253
1212
// NewServices initializes the services
@@ -1261,4 +1220,5 @@ func NewServices() {
1261
1220
newRegisterMailService ()
1262
1221
newNotifyMailService ()
1263
1222
newWebhookService ()
1223
+ newIndexerService ()
1264
1224
}
0 commit comments