We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa3e57d commit ff78b31Copy full SHA for ff78b31
packages/core/src/v3/serverOnly/shutdownManager.ts
@@ -33,6 +33,10 @@ class ShutdownManager {
33
}
34
35
unregister(name: string) {
36
+ if (!this.handlers.has(name)) {
37
+ throw new Error(`Shutdown handler "${name}" not registered`);
38
+ }
39
+
40
this.handlers.delete(name);
41
42
packages/redis-worker/src/worker.ts
@@ -541,7 +541,7 @@ class Worker<TCatalog extends WorkerCatalog> {
541
542
543
public async stop() {
544
- shutdownManager.unregister("redis-worker");
+ shutdownManager.unregister(`redis-worker:${this.options.name}`);
545
await this.shutdown();
546
547
0 commit comments