vona-module-a-redis 5.0.24 → 5.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { BeanInfo, BeanBase, cast, deepExtend, BeanSimple, combineConfigDefault, BeanScopeBase } from 'vona';
1
+ import { BeanInfo, BeanBase, cast, deepExtend, getRedisClientKeyPrefix, BeanSimple, combineConfigDefault, BeanScopeBase } from 'vona';
2
2
  import { Service, Bean, Scope } from 'vona-module-a-bean';
3
3
  import { Redis } from 'ioredis';
4
4
 
@@ -57,12 +57,12 @@ let ServiceRedis = (_dec$1 = Service(), _dec2$1 = BeanInfo({
57
57
  const app = this.app;
58
58
  // clear keys
59
59
  // await this._clearRedisKeys(app.bean.redis.get('limiter'), `b_${app.name}:*`);
60
- await this._clearRedisKeys(app.bean.redis.get('queue'), `bull_${app.name}:*`);
60
+ await this._clearRedisKeys(app.bean.redis.get('queue'), `${getRedisClientKeyPrefix('bull', app)}*`);
61
61
  // broadcast channel has subscribed
62
- // await _clearRedisKeys(app.redis.get('broadcast'), `broadcast_${app.name}:*`);
62
+ // await _clearRedisKeys(app.redis.get('broadcast'), `${getRedisClientKeyPrefix('broadcast', app)}*`);
63
63
  // redlock
64
64
  for (const clientName of this.$scope.redlock.config.redlock.clients) {
65
- await this._clearRedisKeys(app.bean.redis.get(clientName), `redlock_${app.name}:*`);
65
+ await this._clearRedisKeys(app.bean.redis.get(clientName), `${getRedisClientKeyPrefix('redlock', app)}*`);
66
66
  }
67
67
  for (const clientName in app.config.redis.clients) {
68
68
  if (['redlock', 'limiter', 'queue', 'broadcast'].includes(clientName)) continue;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-module-a-redis",
3
3
  "type": "module",
4
- "version": "5.0.24",
4
+ "version": "5.0.25",
5
5
  "title": "a-redis",
6
6
  "vonaModule": {
7
7
  "dependencies": {},