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()
|
mediaClient, err := media.NewMediaClientFromViper()
|
||||||
if err != nil {
|
switch err != nil {
|
||||||
log.Fatal(err)
|
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()
|
RunServer()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue