Autoseed buckets pendant serverCmd

This commit is contained in:
Victor Lacasse-Beaudoin 2023-07-04 20:35:13 -04:00
parent 3891ea36ca
commit 03cef363cd

View file

@ -46,6 +46,18 @@ var serverCmd = &cobra.Command{
log.Fatal(err) log.Fatal(err)
} }
mediaClient, err := media.NewMediaClientFromViper()
if err != nil {
log.Fatal(err)
}
new_buckets, err := mediaClient.Seed()
if err != nil {
log.Fatal(err)
}
log.Printf("Seeded %d buckets.\n", len(new_buckets))
RunServer() RunServer()
}, },
} }