From 8038610a4279862a87e630e4f1d1077c510f9d15 Mon Sep 17 00:00:00 2001 From: Lauris BH Date: Thu, 27 Jan 2022 10:30:51 +0200 Subject: 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 --- modules/indexer/issues/bleve_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/indexer/issues/bleve_test.go') diff --git a/modules/indexer/issues/bleve_test.go b/modules/indexer/issues/bleve_test.go index df036fb573..926c32e242 100644 --- a/modules/indexer/issues/bleve_test.go +++ b/modules/indexer/issues/bleve_test.go @@ -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)) -- cgit v1.2.3