normalize thumbnails

This commit is contained in:
A.Unger
2021-11-08 12:25:15 +01:00
parent 23cfb909eb
commit f76dfc9af1
5 changed files with 22 additions and 104 deletions
+1 -15
View File
@@ -84,11 +84,7 @@ type SutureService struct {
// NewSutureService creates a new store.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
inheritLogging(cfg)
if cfg.Mode == 0 {
cfg.Store.Supervised = true
}
cfg.Store.Log.File = cfg.Log.File
cfg.Store.Log = cfg.Log
return SutureService{
cfg: cfg.Store,
}
@@ -102,13 +98,3 @@ func (s SutureService) Serve(ctx context.Context) error {
return nil
}
// inheritLogging is a poor man's global logging state tip-toeing around circular dependencies. It sets the logging
// of the service to whatever is in the higher config (in this case coming from ocis.yaml) and sets them as defaults,
// being overwritten when the extension parses its config file / env variables.
func inheritLogging(cfg *ociscfg.Config) {
cfg.Store.Log.File = cfg.Log.File
cfg.Store.Log.Color = cfg.Log.Color
cfg.Store.Log.Pretty = cfg.Log.Pretty
cfg.Store.Log.Level = cfg.Log.Level
}