Permettre exécution sans base de donnée #152
1 changed files with 10 additions and 9 deletions
|
@ -48,17 +48,18 @@ var serverCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
mediaClient, err := media.NewMediaClientFromViper()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
switch err != nil {
|
||||
case true:
|
||||
log.Printf("media.NewMediaClientFromViper error: %s", err)
|
||||
case false:
|
||||
new_buckets, err := mediaClient.Seed()
|
||||
if err != nil {
|
||||
log.Printf("(*media.MediaClient).Seed error: %s", err)
|
||||
} else {
|
||||
log.Printf("Seeded %d buckets.\n", len(new_buckets))
|
||||
}
|
||||
}
|
||||
|
||||
new_buckets, err := mediaClient.Seed()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
log.Printf("Seeded %d buckets.\n", len(new_buckets))
|
||||
|
||||
RunServer()
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue