Sync: Import/index after downloading #225

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer
2020-04-06 22:09:45 +02:00
parent 3c8e746ca4
commit 02810ffa94
22 changed files with 380 additions and 173 deletions

View File

@@ -13,13 +13,13 @@ var stop = make(chan bool, 1)
// Start runs the service workers every 10 minutes.
func Start(conf *config.Config) {
ticker := time.NewTicker(10 * time.Minute)
ticker := time.NewTicker(conf.WakeupInterval())
go func() {
for {
select {
case <-stop:
log.Info("shutting down service workers")
log.Info("shutting down workers")
ticker.Stop()
mutex.Share.Cancel()
mutex.Sync.Cancel()