@travetto/model
Advanced tools
Comparing version 4.0.2 to 4.0.3
{ | ||
"name": "@travetto/model", | ||
"version": "4.0.2", | ||
"version": "4.0.3", | ||
"description": "Datastore abstraction for core operations.", | ||
@@ -29,10 +29,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@travetto/config": "^4.0.2", | ||
"@travetto/di": "^4.0.2", | ||
"@travetto/registry": "^4.0.2", | ||
"@travetto/schema": "^4.0.2" | ||
"@travetto/config": "^4.0.3", | ||
"@travetto/di": "^4.0.3", | ||
"@travetto/registry": "^4.0.3", | ||
"@travetto/schema": "^4.0.3" | ||
}, | ||
"peerDependencies": { | ||
"@travetto/cli": "^4.0.2", | ||
"@travetto/test": "^4.0.2" | ||
"@travetto/cli": "^4.0.4", | ||
"@travetto/test": "^4.0.3" | ||
}, | ||
@@ -39,0 +39,0 @@ "peerDependenciesMeta": { |
@@ -1,5 +0,3 @@ | ||
import timers from 'node:timers/promises'; | ||
import { ShutdownManager, Class, TimeSpan, TimeUtil, Util } from '@travetto/base'; | ||
import { ShutdownManager, Class, TimeSpan, TimeUtil } from '@travetto/base'; | ||
import { ModelRegistry } from '../../registry/model'; | ||
@@ -38,11 +36,11 @@ import { ModelExpirySupport } from '../../service/expiry'; | ||
if (svc.deleteExpired && cullable.length) { | ||
let running = true; | ||
const running = new AbortController(); | ||
const cullInterval = TimeUtil.timeToMs(svc.config?.cullRate ?? '10m'); | ||
ShutdownManager.onGracefulShutdown(async () => { running = false; }, this); | ||
ShutdownManager.onGracefulShutdown(async () => running.abort(), this); | ||
(async (): Promise<void> => { | ||
await timers.setTimeout(1000); // Wait a second to start culling | ||
while (running) { | ||
await timers.setTimeout(cullInterval); | ||
await Util.nonBlockingTimeout(1000); | ||
while (!running.signal.aborted) { | ||
await Util.nonBlockingTimeout(cullInterval); | ||
await Promise.all(cullable.map(cls => svc.deleteExpired(cls))); | ||
@@ -49,0 +47,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
160513
2974
Updated@travetto/config@^4.0.3
Updated@travetto/di@^4.0.3
Updated@travetto/registry@^4.0.3
Updated@travetto/schema@^4.0.3