@dudousxd/nestjs-durable-core 0.106.0 → 0.106.1

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.js CHANGED
@@ -7007,6 +7007,10 @@ function createWorkflowCtx(host, runId, compensations, workflow = "", searchAttr
7007
7007
  __name(createWorkflowCtx, "createWorkflowCtx");
7008
7008
 
7009
7009
  // src/engine.ts
7010
+ function isRequeuedStepFailure(cp) {
7011
+ return cp.status === "failed" && cp.attempts === 0 && cp.seq >= 0 && (cp.kind === "local" || cp.kind === "remote");
7012
+ }
7013
+ __name(isRequeuedStepFailure, "isRequeuedStepFailure");
7010
7014
  function mergeTags(staticTags, runTags) {
7011
7015
  if (!staticTags?.length && !runTags?.length) return void 0;
7012
7016
  return [
@@ -14196,6 +14200,7 @@ ${run.workflowVersion}`;
14196
14200
  };
14197
14201
  const events = [];
14198
14202
  for (const cp of checkpoints) {
14203
+ if (isRequeuedStepFailure(cp)) continue;
14199
14204
  if (cp.status === "completed" || cp.status === "failed") {
14200
14205
  if (cp.seq >= HANDOFF_SEQ_BASE) continue;
14201
14206
  if (isAnyCheckpoint(cp)) {
@@ -14280,7 +14285,7 @@ ${run.workflowVersion}`;
14280
14285
  });
14281
14286
  } else if (cmd.kind === "call") {
14282
14287
  const existing = await this.store.getCheckpoint(run.id, cmd.seq);
14283
- if (existing) {
14288
+ if (existing && !isRequeuedStepFailure(existing)) {
14284
14289
  const policed = redriveLost && cmd.policy !== void 0 ? await this.applyCallPolicy(run, cmd, existing) : null;
14285
14290
  const leaseAt = policed !== null ? policed : redriveLost ? await this.redriveLostCall(run, existing) : void 0;
14286
14291
  if (leaseAt != null) wakeAt = wakeAt == null ? leaseAt : Math.min(wakeAt, leaseAt);