@dudousxd/nestjs-durable-core 0.44.1 → 0.45.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/dist/index.cjs +12 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -985,6 +985,17 @@ var TransportPool = class {
|
|
|
985
985
|
...groups
|
|
986
986
|
];
|
|
987
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* Propagate the engine's `namespace` to every transport that partitions by it — so the same
|
|
990
|
+
* namespace that scopes the store also scopes each transport's queues/keys. A transport that
|
|
991
|
+
* doesn't partition (no `useNamespace`) is skipped. Idempotent; a transport given an explicit
|
|
992
|
+
* namespace at construction ignores this (see {@link Transport.useNamespace}).
|
|
993
|
+
*/
|
|
994
|
+
useNamespace(namespace) {
|
|
995
|
+
for (const { transport } of this.transports) {
|
|
996
|
+
transport.useNamespace?.(namespace);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
988
999
|
/** Pinned `preferId` first, then the rest (failover order). */
|
|
989
1000
|
ordered(preferId) {
|
|
990
1001
|
if (!preferId) return this.transports;
|
|
@@ -1652,6 +1663,7 @@ var WorkflowEngine = class {
|
|
|
1652
1663
|
this.admission.onFreed?.((queue) => this.wakeQueueWaiters(queue));
|
|
1653
1664
|
this.instanceId = deps.instanceId ?? globalThis.crypto.randomUUID();
|
|
1654
1665
|
this.namespace = deps.namespace ?? "default";
|
|
1666
|
+
this.pool.useNamespace(this.namespace);
|
|
1655
1667
|
this.leaseMs = deps.leaseMs ?? 3e4;
|
|
1656
1668
|
this.maxRecoveryAttempts = deps.maxRecoveryAttempts;
|
|
1657
1669
|
this.remoteAdvanceSilenceMs = deps.remoteAdvanceSilenceMs;
|