@dudousxd/nestjs-durable-core 0.40.0 → 0.41.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 +20 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1280,7 +1280,8 @@ function createWorkflowCtx(host, runId, compensations, workflow = "") {
|
|
|
1280
1280
|
await store.putSignalWaiter({
|
|
1281
1281
|
token: `child:${childId}`,
|
|
1282
1282
|
runId,
|
|
1283
|
-
seq
|
|
1283
|
+
seq,
|
|
1284
|
+
parallelGroup: group
|
|
1284
1285
|
});
|
|
1285
1286
|
if (!await store.getRun(childId)) host.startChild(name, inputs[i], childId);
|
|
1286
1287
|
if (!cp) {
|
|
@@ -2355,7 +2356,12 @@ var WorkflowEngine = class {
|
|
|
2355
2356
|
seq: waiter.seq,
|
|
2356
2357
|
name: `signal:${token}`,
|
|
2357
2358
|
kind: "signal",
|
|
2358
|
-
output: payload
|
|
2359
|
+
output: payload,
|
|
2360
|
+
// Carry the awaiting command's fan group (set when a `ctx.gather_children`/`ctx.all` fan-out
|
|
2361
|
+
// registered this waiter) onto the resolving `signal:child:<id>` checkpoint, so the dashboard
|
|
2362
|
+
// groups the child fan-out vertically instead of rendering it as a sequential chain. Undefined
|
|
2363
|
+
// for an ordinary (non-fan) signal/child await.
|
|
2364
|
+
parallelGroup: waiter.parallelGroup
|
|
2359
2365
|
}));
|
|
2360
2366
|
return this.resume(waiter.runId).catch((err) => {
|
|
2361
2367
|
if (err instanceof NamespaceMismatch) return null;
|
|
@@ -3056,6 +3062,7 @@ var WorkflowEngine = class {
|
|
|
3056
3062
|
error: cmd.error
|
|
3057
3063
|
});
|
|
3058
3064
|
} else if (cmd.kind === "call") {
|
|
3065
|
+
if (await this.store.getCheckpoint(run.id, cmd.seq)) continue;
|
|
3059
3066
|
await this.store.saveCheckpoint(stepCheckpoint({
|
|
3060
3067
|
runId: run.id,
|
|
3061
3068
|
seq: cmd.seq,
|
|
@@ -3067,7 +3074,11 @@ var WorkflowEngine = class {
|
|
|
3067
3074
|
workerGroup: cmd.group,
|
|
3068
3075
|
enqueuedAt: at,
|
|
3069
3076
|
startedAt: at,
|
|
3070
|
-
finishedAt: at
|
|
3077
|
+
finishedAt: at,
|
|
3078
|
+
// A `ctx.gather_calls([...])` fan-out stamps every dispatched `call` in the fan with the
|
|
3079
|
+
// same group, so the dashboard renders the remote steps as one parallel fan (parity with
|
|
3080
|
+
// the gathered `recordStep`/`startChild` tags). Undefined for a lone sequential `ctx.call`.
|
|
3081
|
+
parallelGroup: cmd.parallelGroup
|
|
3071
3082
|
}));
|
|
3072
3083
|
await this.pool.dispatch({
|
|
3073
3084
|
runId: run.id,
|
|
@@ -3125,7 +3136,12 @@ var WorkflowEngine = class {
|
|
|
3125
3136
|
await this.store.putSignalWaiter({
|
|
3126
3137
|
token: `child:${childId}`,
|
|
3127
3138
|
runId: run.id,
|
|
3128
|
-
seq: cmd.seq
|
|
3139
|
+
seq: cmd.seq,
|
|
3140
|
+
// A `ctx.gather_children`/`ctx.all` fan-out stamps every `startChild` in the fan with the same
|
|
3141
|
+
// group. Thread it onto the waiter so the child's terminal `signal:child:<id>` checkpoint
|
|
3142
|
+
// (written by engine.signal when the child notifies the parent) carries the group and the
|
|
3143
|
+
// dashboard renders the fan as one parallel group. Undefined for a lone (non-fan) child.
|
|
3144
|
+
parallelGroup: cmd.parallelGroup
|
|
3129
3145
|
});
|
|
3130
3146
|
if (!await this.store.getRun(childId)) {
|
|
3131
3147
|
queueMicrotask(() => void this.start(cmd.workflow, cmd.input, childId).catch(() => void 0));
|