working toward storing state in db
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
package locator
|
||||
|
||||
import "encoding/json"
|
||||
import "io/ioutil"
|
||||
import "net/http"
|
||||
import "time"
|
||||
import "sync"
|
||||
import (
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
import "github.com/rs/zerolog/log"
|
||||
import "golang.org/x/sync/semaphore"
|
||||
import "git.eeqj.de/sneak/feta/jsonapis"
|
||||
import "git.eeqj.de/sneak/feta/instance"
|
||||
import "git.eeqj.de/sneak/feta"
|
||||
"git.eeqj.de/sneak/feta/instance"
|
||||
"git.eeqj.de/sneak/feta/jsonapis"
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/sync/semaphore"
|
||||
)
|
||||
|
||||
//import "git.eeqj.de/sneak/feta"
|
||||
|
||||
// IndexAPITimeout is the timeout for fetching json instance lists
|
||||
// from the listing servers
|
||||
@@ -120,8 +124,7 @@ func (il *InstanceLocator) Locate() {
|
||||
|
||||
time.Sleep(1 * time.Second)
|
||||
|
||||
c := feta.GetConfig()
|
||||
if time.Now().After(x.Add(c.LogReportInterval)) {
|
||||
if time.Now().After(x.Add(viper.GetDuration("LogReportInterval"))) {
|
||||
x = time.Now()
|
||||
log.Debug().
|
||||
Str("nextMastodonIndexRefresh", il.durationUntilNextMastodonIndexRefresh().String()).
|
||||
|
||||
Reference in New Issue
Block a user