@dudousxd/nestjs-durable 0.45.0 → 0.46.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 +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/skills/durable-determinism/SKILL.md +23 -0
package/dist/index.cjs
CHANGED
|
@@ -1612,7 +1612,7 @@ var StoreRunGateway = class {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
async listRuns(query) {
|
|
1614
1614
|
const runs = await this.store.listRuns(query);
|
|
1615
|
-
const waiterByRun = (0, import_nestjs_durable_core9.indexWaitersByRun)(await this.store.
|
|
1615
|
+
const waiterByRun = (0, import_nestjs_durable_core9.indexWaitersByRun)(await (0, import_nestjs_durable_core9.listSignalWaitersOfRuns)(this.store, runs.filter((run) => run.status === "suspended").map((run) => run.id)));
|
|
1616
1616
|
return runs.map((run) => {
|
|
1617
1617
|
const waiting = (0, import_nestjs_durable_core9.resolveRunWaiting)(run, waiterByRun);
|
|
1618
1618
|
return waiting ? {
|
|
@@ -1649,12 +1649,12 @@ var StoreRunGateway = class {
|
|
|
1649
1649
|
/**
|
|
1650
1650
|
* Bulk-resolve what each of `runIds` is currently parked on — for a consumer with its own filtered/
|
|
1651
1651
|
* paginated run listing (e.g. "which of MY suspended runs are stuck at a breakpoint") without
|
|
1652
|
-
* re-deriving `listRuns`' waiter
|
|
1653
|
-
* `listRuns`' waiting computation (the
|
|
1652
|
+
* re-deriving `listRuns`' waiter read or querying `durable_step_checkpoints` directly. Mirrors
|
|
1653
|
+
* `listRuns`' waiting computation (the requested runs' signal waiters + `resolveRunWaiting`), but ALSO
|
|
1654
1654
|
* bulk-fetches the currently-suspended runs to check real status: `engine.cancel` (the non-compensate
|
|
1655
1655
|
* path) doesn't clear a run's signal waiter row, so a cancelled run can leave an ORPHANED waiter
|
|
1656
1656
|
* behind — trusting waiter presence alone would wrongly report a terminal run as still waiting.
|
|
1657
|
-
* Two bulk
|
|
1657
|
+
* Two bulk reads total (never one query per requested id), same as `listRuns`.
|
|
1658
1658
|
*/
|
|
1659
1659
|
async waitingFor(runIds) {
|
|
1660
1660
|
if (runIds.length === 0) return {};
|
|
@@ -1665,7 +1665,7 @@ var StoreRunGateway = class {
|
|
|
1665
1665
|
"suspended"
|
|
1666
1666
|
]
|
|
1667
1667
|
}),
|
|
1668
|
-
this.store
|
|
1668
|
+
(0, import_nestjs_durable_core9.listSignalWaitersOfRuns)(this.store, runIds)
|
|
1669
1669
|
]);
|
|
1670
1670
|
const waiterByRun = (0, import_nestjs_durable_core9.indexWaitersByRun)(waiters);
|
|
1671
1671
|
const result = {};
|
|
@@ -2392,7 +2392,7 @@ var RunGatewayBootstrap = class RunGatewayBootstrap2 {
|
|
|
2392
2392
|
if (typeof publishTenantEvent === "function") {
|
|
2393
2393
|
const republisher = new TenantEventRepublisher(store, publishTenantEvent.bind(this.transport));
|
|
2394
2394
|
this.unsubscribe = this.engine.subscribe((event) => {
|
|
2395
|
-
void republisher.handle(event);
|
|
2395
|
+
void republisher.handle(event).catch(() => void 0);
|
|
2396
2396
|
});
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|