@travetto/model-redis 3.4.5 → 4.0.0-rc.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-redis",
3
- "version": "3.4.5",
3
+ "version": "4.0.0-rc.0",
4
4
  "description": "Redis backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,12 +25,12 @@
25
25
  "directory": "module/model-redis"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/config": "^3.4.4",
29
- "@travetto/model": "^3.4.5",
30
- "redis": "^4.6.10"
28
+ "@travetto/config": "^4.0.0-rc.0",
29
+ "@travetto/model": "^4.0.0-rc.0",
30
+ "redis": "^4.6.11"
31
31
  },
32
32
  "peerDependencies": {
33
- "@travetto/command": "^3.4.3"
33
+ "@travetto/command": "^4.0.0-rc.0"
34
34
  },
35
35
  "peerDependenciesMeta": {
36
36
  "@travetto/command": {
package/src/service.ts CHANGED
@@ -176,7 +176,7 @@ export class RedisModelService implements ModelCrudSupport, ModelExpirySupport,
176
176
  this.client = redis.createClient(this.config.client);
177
177
  await this.client.connect();
178
178
  await ModelStorageUtil.registerModelChangeListener(this);
179
- ShutdownManager.onShutdown(this, () => this.client.disconnect());
179
+ ShutdownManager.onGracefulShutdown(() => this.client.disconnect(), this);
180
180
  for (const el of ModelRegistry.getClasses()) {
181
181
  for (const idx of ModelRegistry.get(el).indices ?? []) {
182
182
  switch (idx.type) {
@@ -1,7 +1,6 @@
1
- import { Env } from '@travetto/base';
2
1
  import type { CommandService } from '@travetto/command';
3
2
 
4
- const version = Env.get('REDIS_VERSION', '7.2');
3
+ const version = process.env.REDIS_VERSION || '7.2';
5
4
 
6
5
  export const service: CommandService = {
7
6
  name: 'redis',