From 7a2f757f48dd5832d4c6cc94db664ed412f70396 Mon Sep 17 00:00:00 2001 From: josh <josh@elixxir.io> Date: Tue, 8 Jun 2021 11:04:11 -0700 Subject: [PATCH] Clean up code --- api/client.go | 4 +--- storage/auth/store.go | 4 +--- storage/partition/store.go | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/api/client.go b/api/client.go index e6fddd7f4..ecd0cda74 100644 --- a/api/client.go +++ b/api/client.go @@ -563,9 +563,7 @@ func (c *Client) DeleteContact(partnerId *id.ID) error { return err } c.storage.Conversations().Delete(partnerId) - // todo: find a way to clean partition up? - //c.storage.Partition().Clean() - return nil + return nil } // ----- Utility Functions ----- diff --git a/storage/auth/store.go b/storage/auth/store.go index 616ef5c06..c8116571a 100644 --- a/storage/auth/store.go +++ b/storage/auth/store.go @@ -118,7 +118,7 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St PrivKey: nil, Request: r, } - jww.INFO.Printf("Loaded send request for %s", sr.partner) + jww.DEBUG.Printf("Loaded send request for %s", sr.partner) rid = sr.partner r.sent = sr @@ -135,7 +135,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St default: jww.FATAL.Panicf("Unknown request type: %d", r.rt) } - jww.INFO.Printf("LoadStore partner: %s", partner) //store in the request map s.requests[*rid] = r @@ -146,7 +145,6 @@ func LoadStore(kv *versioned.KV, grp *cyclic.Group, privKeys []*cyclic.Int) (*St func (s *Store) save() error { requestIDList := make([]requestDisk, len(s.requests)) - jww.INFO.Printf("Saving Auth Store") index := 0 for pid, r := range s.requests { rDisk := requestDisk{ diff --git a/storage/partition/store.go b/storage/partition/store.go index b214b2ced..a72fd0d62 100644 --- a/storage/partition/store.go +++ b/storage/partition/store.go @@ -22,7 +22,7 @@ import ( type multiPartID [16]byte const packagePrefix = "Partition" -const clearPartitionInterval = 12*time.Hour +const clearPartitionInterval = 5*time.Hour const clearPartitionThreshold = 24*time.Hour type Store struct { -- GitLab