Precalculate index stats
This commit is contained in:
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user