@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.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7310,6 +7310,10 @@ function createWorkflowCtx(host, runId, compensations, workflow = "", searchAttr
|
|
|
7310
7310
|
__name(createWorkflowCtx, "createWorkflowCtx");
|
|
7311
7311
|
|
|
7312
7312
|
// src/engine.ts
|
|
7313
|
+
function isRequeuedStepFailure(cp) {
|
|
7314
|
+
return cp.status === "failed" && cp.attempts === 0 && cp.seq >= 0 && (cp.kind === "local" || cp.kind === "remote");
|
|
7315
|
+
}
|
|
7316
|
+
__name(isRequeuedStepFailure, "isRequeuedStepFailure");
|
|
7313
7317
|
function mergeTags(staticTags, runTags) {
|
|
7314
7318
|
if (!staticTags?.length && !runTags?.length) return void 0;
|
|
7315
7319
|
return [
|
|
@@ -14499,6 +14503,7 @@ ${run.workflowVersion}`;
|
|
|
14499
14503
|
};
|
|
14500
14504
|
const events = [];
|
|
14501
14505
|
for (const cp of checkpoints) {
|
|
14506
|
+
if (isRequeuedStepFailure(cp)) continue;
|
|
14502
14507
|
if (cp.status === "completed" || cp.status === "failed") {
|
|
14503
14508
|
if (cp.seq >= HANDOFF_SEQ_BASE) continue;
|
|
14504
14509
|
if (isAnyCheckpoint(cp)) {
|
|
@@ -14583,7 +14588,7 @@ ${run.workflowVersion}`;
|
|
|
14583
14588
|
});
|
|
14584
14589
|
} else if (cmd.kind === "call") {
|
|
14585
14590
|
const existing = await this.store.getCheckpoint(run.id, cmd.seq);
|
|
14586
|
-
if (existing) {
|
|
14591
|
+
if (existing && !isRequeuedStepFailure(existing)) {
|
|
14587
14592
|
const policed = redriveLost && cmd.policy !== void 0 ? await this.applyCallPolicy(run, cmd, existing) : null;
|
|
14588
14593
|
const leaseAt = policed !== null ? policed : redriveLost ? await this.redriveLostCall(run, existing) : void 0;
|
|
14589
14594
|
if (leaseAt != null) wakeAt = wakeAt == null ? leaseAt : Math.min(wakeAt, leaseAt);
|