chore(storage): storage performance issues (#500)
* chore(storage): storage performance issues 1. close storage connection before shutdown the service 2. update windows image https://github.com/appleboy/gorush/issues/393 Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -40,6 +40,11 @@ func (s *Storage) Init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close the storage connection
|
||||
func (s *Storage) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Reset Client storage.
|
||||
func (s *Storage) Reset() {
|
||||
atomic.StoreInt64(&s.stat.TotalCount, 0)
|
||||
|
||||
@@ -41,4 +41,6 @@ func TestMemoryEngine(t *testing.T) {
|
||||
memory.Reset()
|
||||
val = memory.GetTotalCount()
|
||||
assert.Equal(t, int64(0), val)
|
||||
|
||||
assert.NoError(t, memory.Close())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user