Precalculate index stats

This commit is contained in:
Pijus Kamandulis
2025-06-23 17:52:20 +03:00
parent d801debaf6
commit be637f4540
13 changed files with 243 additions and 81 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import (
"github.com/ostafen/clover/v2"
"github.com/ostafen/clover/v2/document"
"pool-stats/constants"
"pool-stats/database"
"pool-stats/models"
)
@@ -26,7 +27,7 @@ func NewIngestor(db *clover.DB, path string) *Ingestor {
}
func (this *Ingestor) WatchAndIngest() {
ticker := time.NewTicker(30 * time.Second)
ticker := time.NewTicker(constants.IngestorWatchInterval)
defer ticker.Stop()
for {