chore: medusa shutdown (#6865)
* chore: medusa shutdown * continue * use shutdown * on application shutdown * consume shutdown * more connection close * more cleanup * more cleanup * update lock * revert package * graceful shutdown * Create yellow-apples-attack.md * graceful shutdown * graceful shutdown --------- Co-authored-by: Sebastian Rindom <skrindom@gmail.com> Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
This commit is contained in:
committed by
GitHub
parent
0c0b425de7
commit
8fd1488938
@@ -23,6 +23,13 @@ class RedisCacheService implements ICacheService {
|
||||
this.TTL = options.ttl ?? DEFAULT_CACHE_TIME
|
||||
this.namespace = options.namespace || DEFAULT_NAMESPACE
|
||||
}
|
||||
|
||||
__hooks = {
|
||||
onApplicationShutdown: async () => {
|
||||
this.redis.disconnect()
|
||||
},
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a key/value pair to the cache.
|
||||
* If the ttl is 0 it will act like the value should not be cached at all.
|
||||
|
||||
Reference in New Issue
Block a user