adjust admin crawls info

This commit is contained in:
Cyberes 2024-01-23 12:31:23 -07:00
parent 4a74b00d46
commit e000d29aa5
1 changed files with 6 additions and 4 deletions

View File

@ -39,8 +39,10 @@ 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(),
},
@ -50,8 +52,8 @@ func AdminCrawlsInfo(w http.ResponseWriter, r *http.Request) {
},
},
}
defer elastic.RefreshSyncRunning.Release(1)
defer elastic.FullSyncRunning.Release(1)
elastic.RefreshSyncRunning.Release(1)
elastic.FullSyncRunning.Release(1)
w.Header().Set("Cache-Control", "no-store")
w.Header().Set("Content-Type", "application/json")