reorganize admin crawl info json, clarify debug message
This commit is contained in:
parent
ba2747c186
commit
665a2e8c18
|
@ -50,11 +50,9 @@ func AdminCrawlsInfo(w http.ResponseWriter, r *http.Request) {
|
|||
"initialCrawlElapsed": config.InitialCrawlElapsed,
|
||||
"elastic": map[string]interface{}{
|
||||
"deleteWorkers": map[string]interface{}{
|
||||
"busy": elastic.BusyWorkers,
|
||||
"alive": config.GetConfig().ElasticsearchSyncThreads,
|
||||
},
|
||||
"queue": map[string]interface{}{
|
||||
"size": elastic.Queue.GetQueueSize(),
|
||||
"busy": elastic.BusyWorkers,
|
||||
"alive": config.GetConfig().ElasticsearchSyncThreads,
|
||||
"queueSize": elastic.Queue.GetQueueSize(),
|
||||
},
|
||||
"syncRunning": map[string]interface{}{
|
||||
"refresh": refreshSyncRunning,
|
||||
|
|
|
@ -26,7 +26,8 @@ func addToElasticsearch(fullPath string, info os.FileInfo, incomingErr error) er
|
|||
if !shouldExclude(relPath, config.GetConfig().ElasticsearchExcludePatterns) {
|
||||
cacheItem, found := SharedCache.Cache.Get(relPath)
|
||||
if !found {
|
||||
log.Warnf(`ELASTICSEARCH - Could not fetch item "%s" from the LRU cache! Deleting this item from Elastic. This error can probably be ignored.`, relPath)
|
||||
log.Debugf(`ELASTICSEARCH - path "%s" exists on disk, but not in the LRU cache. Deleting from Elastic.`, relPath)
|
||||
// Delete this item from Elastic in order to avoid any strange inconsistencies.
|
||||
err := deleteFromElasticsearch(encodeToBase64(relPath))
|
||||
if err != nil {
|
||||
log.Errorf("ELASTIC - failed to delete \"%s\" - %s", relPath, err)
|
||||
|
|
Loading…
Reference in New Issue