@dudousxd/nestjs-durable-core 0.96.0 → 0.97.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 CHANGED
@@ -5374,11 +5374,11 @@ var TransportPool = class {
5374
5374
  * but none is published — both are the "guard disengaged / legacy assume-compatible" case, so the
5375
5375
  * engine's routing guard treats an empty result identically (design §7.7).
5376
5376
  */
5377
- async readWorkerDescriptors(group) {
5377
+ async readWorkerDescriptors(group, opts) {
5378
5378
  const descriptors = [];
5379
5379
  for (const { transport } of this.transports) {
5380
5380
  if (transport.readWorkerDescriptors) {
5381
- descriptors.push(...await transport.readWorkerDescriptors(group));
5381
+ descriptors.push(...await transport.readWorkerDescriptors(group, opts));
5382
5382
  }
5383
5383
  }
5384
5384
  return descriptors;
@@ -14103,11 +14103,14 @@ ${run.workflowVersion}`;
14103
14103
  }
14104
14104
  /** The live descriptors for `token`, reused for {@link workerDescriptorCacheMs}; one read in flight. */
14105
14105
  liveWorkerDescriptors(token, fresh = false) {
14106
- if (this.workerDescriptorCacheMs <= 0) return this.pool.readWorkerDescriptors(token);
14106
+ const opts = fresh ? {
14107
+ fresh: true
14108
+ } : void 0;
14109
+ if (this.workerDescriptorCacheMs <= 0) return this.pool.readWorkerDescriptors(token, opts);
14107
14110
  const now = Date.now();
14108
14111
  const cached = this.descriptorCache.get(token);
14109
14112
  if (!fresh && cached && now - cached.at < this.workerDescriptorCacheMs) return cached.read;
14110
- const read = this.pool.readWorkerDescriptors(token);
14113
+ const read = this.pool.readWorkerDescriptors(token, opts);
14111
14114
  const entry = {
14112
14115
  at: now,
14113
14116
  read