mirror of
https://github.com/photoprism/photoprism.git
synced 2025-10-09 10:40:33 +08:00
CLI: Refactor tests and config initialization
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -79,13 +79,12 @@ var FacesCommand = cli.Command{
|
||||
func facesStatsAction(ctx *cli.Context) error {
|
||||
start := time.Now()
|
||||
|
||||
conf := config.NewConfig(ctx)
|
||||
service.SetConfig(conf)
|
||||
conf, err := InitConfig(ctx)
|
||||
|
||||
_, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
if err := conf.Init(); err != nil {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user