This splits the ignore getting to two methods, one that loads from disk (the old one) and one that just returns whatever is already loaded (the new one). The folder summary service which is just interested in stats now uses the latter method. This means that it, and API calls that call it, does not get blocked by folder I/O.
This commit is contained in:
+1
-1
@@ -1218,7 +1218,7 @@ func (s *service) getDBIgnores(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
folder := qs.Get("folder")
|
||||
|
||||
lines, patterns, err := s.model.GetIgnores(folder)
|
||||
lines, patterns, err := s.model.LoadIgnores(folder)
|
||||
if err != nil && !ignore.IsParseError(err) {
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user