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
@@ -1,6 +1,7 @@
package jobs
import (
"pool-stats/constants"
"pool-stats/database"
"pool-stats/helpers"
"pool-stats/models"
@@ -20,7 +21,7 @@ func NewRecalculateTopSharesJob(db *clover.DB) *RecalculateTopSharesJob {
}
func (job *RecalculateTopSharesJob) Run() error {
ticker := time.NewTicker(10 * time.Second)
ticker := time.NewTicker(constants.RecalculateTopSharesJobInterval)
defer ticker.Stop()
for {