forked from forgejo/forgejo
Automatically pause queue if index service is unavailable (#15066)
* Handle keyword search error when issue indexer service is not available * Implement automatic disabling and resume of code indexer queue
This commit is contained in:
parent
2649eddcf0
commit
8038610a42
28 changed files with 522 additions and 151 deletions
|
@ -5,6 +5,7 @@
|
|||
package issues
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
|
@ -84,7 +85,7 @@ func TestBleveIndexAndSearch(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, kw := range keywords {
|
||||
res, err := indexer.Search(kw.Keyword, []int64{2}, 10, 0)
|
||||
res, err := indexer.Search(context.TODO(), kw.Keyword, []int64{2}, 10, 0)
|
||||
assert.NoError(t, err)
|
||||
|
||||
ids := make([]int64, 0, len(res.Hits))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue