Fix incorrect args in debug

This commit is contained in:
mcrakhman 2022-12-05 20:02:26 +01:00
parent f9a064e9aa
commit 50e3d70f70
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B
2 changed files with 4 additions and 3 deletions

View File

@ -108,8 +108,9 @@ func (s *space) LastUsage() time.Time {
} }
func (s *space) Locked() bool { func (s *space) Locked() bool {
log.With(zap.Int32("trees used", s.treesUsed.Load())).Debug("space lock status check") locked := s.treesUsed.Load() > 1
return s.treesUsed.Load() > 1 log.With(zap.Int32("trees used", s.treesUsed.Load()), zap.Bool("locked", locked)).Debug("space lock status check")
return locked
} }
func (s *space) Id() string { func (s *space) Id() string {

View File

@ -195,7 +195,7 @@ func (s *service) registerClientCommands() {
fmt.Println("couldn't delete the document", err) fmt.Println("couldn't delete the document", err)
return return
} }
fmt.Println("deleted", args[1]) fmt.Println("deleted", args[0])
}, },
} }
cmdDeleteDocument.Flags().String("space", "", "the space where something is happening :-)") cmdDeleteDocument.Flags().String("space", "", "the space where something is happening :-)")